PeterdeB
asked on
mysql_fetch_row wrong parameter count
My code works when using it in windows but not in linux
I checked the mysql version the one in windows = MySQL client version: 5.1.41
The one in linux = MySQL client version: 5.0.67
In windows it fills all the values as it should
In linux the fields remain empty
If i remove the second parameter then the warning is gone but then it does not work in windows anymore either
This is the actual error:
Wrong parameter count for mysql_fetch_row() in /public_html/_test/profile .php on line 22
See the attached code that results in the error
Anyone know why this happens?
Regards
I checked the mysql version the one in windows = MySQL client version: 5.1.41
The one in linux = MySQL client version: 5.0.67
In windows it fills all the values as it should
In linux the fields remain empty
If i remove the second parameter then the warning is gone but then it does not work in windows anymore either
This is the actual error:
Wrong parameter count for mysql_fetch_row() in /public_html/_test/profile
See the attached code that results in the error
Anyone know why this happens?
Regards
// Zet het resultaat in een variabele
$row=mysql_fetch_row($result,MYSQL_ASSOC);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just a point: do you really need the number of rows prior to get the results ? If you want just the number of rows, have you considered to make a "SELECT count(*)" statement ?
ASKER
I did study the [ link to the ] function, but could not make it work, yours works at once angelll
@One question though, why did the false declaration work in windows? Was that because of the difference in version?
@Qplana i just needed the result of one row, i had been busy with the select * count code for all of this morning but could not get it to work, so im glad this one works now, though it might not be the best solution
@One question though, why did the false declaration work in windows? Was that because of the difference in version?
@Qplana i just needed the result of one row, i had been busy with the select * count code for all of this morning but could not get it to work, so im glad this one works now, though it might not be the best solution
ASKER
Thanks for your fast and to-the-point answer, forgive me for my newbie answers, im new to this
http://php.net/manual/en/function.mysql-fetch-array.php