PDA

View Full Version : My Recordsets not showing up in the bindings panel


woofy
11-17-2010, 10:58 AM
For some reason this recordset does not show up in the binding panel but works fine onsite. Can you think of any reason its not showing up?


mysql_select_db($database_con2com, $con2com);
$query_rsVOTES = "SELECT username, Sum(score) FROM points
GROUP BY username ORDER by Sum(score) DESC LIMIT 0,1";
$rsVOTES = mysql_query($query_rsVOTES, $con2com) or die(mysql_error());
$row_rsVOTES = mysql_fetch_assoc($rsVOTES);
$totalRows_rsVOTES = mysql_num_rows($rsVOTES);

woofy
11-18-2010, 09:20 AM
For anyone who might have had this problem it was due to the 2nd string of code not being on the same line. Really weird and simple fix. I guess they all have to be on the same line. So the correct code looks like


mysql_select_db($database_con2com, $con2com);
$query_rsVOTES = "SELECT username, Sum(score) FROM points GROUP BY username ORDER BY Sum(score) DESC LIMIT 0,1";
$rsVOTES = mysql_query($query_rsVOTES, $con2com) or die(mysql_error());
$row_rsVOTES = mysql_fetch_assoc($rsVOTES);
$totalRows_rsVOTES = mysql_num_rows($rsVOTES);