Sep 21, 2010 04:39 AM|sitaramnayak|LINK
hi i am trying to get the selected rows row number . my code is this
Dim com As New MySqlCommand
com.Connection = con
com.CommandType = CommandType.Text
com.CommandText = "SET @rownum := 0; + SELECT * FROM (SELECT @rownum := @rownum+1 AS rank, photoid, photo FROM photoalbum ORDER BY photoid DESC) AS tab1 WHERE rank = 3 "
but it is giving the error @rownum need to declare.
How can i do this