I made a portal where i have to fetch result with primary key as id i am using it everywhere storing it in a variable however there is a certain problem that i am facing
$sql="SELECT users from hostelusers WHERE users Like'%$roll%'";
$result = mysql_query($sql) or die(mysql_error());
$rows=mysql_fetch_row($result);
$uid=$rows[0];
$_SESSION['uid']=$uid;
In my code the variable $uid is echoing out values of column 1 ie users however I have selected column 0 which is id(in the table in mysql)
can't think of any mistake there