Jump to content

Unable to jump to row 0 on MySQL result...


acctman

Recommended Posts

Put an @ symbol in front of "mysql_result".

 

If you want to suppress the error why don't you just take out the entire line?

 

its looping though, so i'd like for it to just bypass the records with no images but display all the other ones. i read somewhere about using mysql_num_rows() to check and display only rows with data. but i'm not sure how to apply that

You can just do:

 

if($en['i_id'] = mysql_result(mysql_query("SELECT i_id FROM rate_pictures WHERE i_status='2' AND i_user='".$en[msg_sender]."'"), 0, "i_id")) {
   // Proceed
} else {
   // Invalid
}

 

last question is it bad to escape out non-errors with the @ sign?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.