I always get errors in the code at http://pastebin.com/4DyhFSmB
The following errors are:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 11 on MySQL result index 4 in C:\xampp\htdocs\MySQL_Site\product_page.php on line 64
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 11 on MySQL result index 4 in C:\xampp\htdocs\MySQL_Site\product_page.php on line 65
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 11 on MySQL result index 4 in C:\xampp\htdocs\MySQL_Site\product_page.php on line 66
Notice: Undefined variable: first in C:\xampp\htdocs\MySQL_Site\product_page.php on line 68
Notice: Undefined variable: last in C:\xampp\htdocs\MySQL_Site\product_page.php on line 68
What is the damn problem?
P.S.: I want PHP to output vars name, price, avail and many others to a line at 'echo' part using id (.../ppage.php?id=11 for ex.)
P.P.S.: I don't really care about errors with first and last vars
Beginner: I need code debug (I don't understand the problem)
Moderator: General Moderators
Re: Beginner: I need code debug (I don't understand the prob
I believe mysql_close() should be called after the while loop 
Re: Beginner: I need code debug (I don't understand the prob
Heh, thanks, but none of the problems look different nor did disappear. I guess I just try checking what type of variables, numerical or strings, are present. Also I got a code from the previous post which I am modyfying to suit my needs, it looks quite different from the code I have.
Re: Beginner: I need code debug (I don't understand the prob
Check line 51 in your code.
$var = mysql_numrows();
should be
$var = mysql_num_rows();
$var = mysql_numrows();
should be
$var = mysql_num_rows();
Re: Beginner: I need code debug (I don't understand the prob
Yeah, but mysql_numrows is a deprecated alias of mysql_num_rows and if it didn't exists, the script would die with fatal error - call to undefined functiondivedj wrote:Check line 51 in your code.
$var = mysql_numrows();
should be
$var = mysql_num_rows();