MySQL errors

Status
Not open for further replies.

risingdevil

New Member
Messages
10
Reaction score
0
Points
0
hi,
im having trouble with my site since the mysql maintenance, i keep getting different MySQL errors, instead of a normal page such as my home page is all out of proportion and missing links with
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dnacomp/public_html/lib/database/mysql.php on line 529

and also getting that on other pages.
also when i click on product links on my webpage, it is missing all the files and products. which where linked to MySQL.

im unaware if MySQL maintenance is still underway.

any help would be appreciated.

Thank you
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
If you coded the system yourself,

check the line mentioned (529) and make sure it has a die statement at the end of it.

liek this:

PHP:
$result = mysql_num_rows('somedata') or die(MYSQL_ERROR());

Sometimes PHP does that. I'm not sure why. Just something I've known to fix my issues with num_rows.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You should only use "or die()" for debugging. For production code, you'll need a different approach to error handling. Since that's the whole raison d'etre of exceptions, they're the natural choice. Furthermore, if you're going to do something other than "or die()" for production code, you might as well do it from the start.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
This error is produced by PHP, not the MySQL server. Make sure that the select query executes correctly. (I am on chopin and I have not problems with MySQL).
 
Status
Not open for further replies.
Top