illuz1on Posted April 13, 2007 Share Posted April 13, 2007 Anyone know why this piece of code wont work? Getting this error: Party-zA Clubs Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/capetown/public_html/pza/db.php on line 35 This is the function: function SQLGetRow($res) { $row = mysql_fetch_row($res); return $row; } <font class="header">Party-zA Clubs</font><br> <br> <?php $result = SQLQuery('SELECT ID,Name from '.SQLTable('partyza_club')); $c = 1; while (list($clubid,$clubname) = SQLGetRow($result)) { ?> <?php echo $c ?>. <a href="clubs.php?view=<?php echo $clubid; ?>&name=<?php echo $clubname; ?>"><?php echo $clubname; ?><br></a> <?php $c++; } ?> Link to comment https://forums.phpfreaks.com/topic/46933-sqlgetrow-used-to-work-but-wont-anymore-pls-help/ Share on other sites More sharing options...
xander85 Posted April 13, 2007 Share Posted April 13, 2007 Try changing this line, it looks like concat is not finished: $result = SQLQuery('SELECT ID,Name from '.SQLTable('partyza_club')); change to: $result = SQLQuery('SELECT ID,Name from .SQLTable('partyza_club').'); You need a . in there and the quotes are messed up, I believe. Also, I'm not sure if you can pass SQLQuery to mysql_fetch_row, it might to be mysql_query, but I could stand corrected. Link to comment https://forums.phpfreaks.com/topic/46933-sqlgetrow-used-to-work-but-wont-anymore-pls-help/#findComment-228902 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.