Jump to content

Archived

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

SkullMaster

Does the row exist?

Recommended Posts

Can anyone tell me if there is a mysql command to search for a row number in a mysql table? im working on a file upload site and displaying the file info. I recently added the admin's delete feature that deletes the row from the mysql table, and now i have missing rows and get errors when i try to display the file info.

Warning: mysql_result(): Unable to jump to row 19 on MySQL result index 24 in /home/skullmas/public_html/working/admin2.php on line 99

i was just looking for something that would let me see if row 19(for example) was in the table before it tried to get the data that doesnt exist from it.

Thanks

Share this post


Link to post
Share on other sites
Why don't you search for the ID of that row? And if it exists, then delete the row?

Share this post


Link to post
Share on other sites
[!--quoteo(post=374717:date=May 17 2006, 12:48 PM:name=SkullMaster)--][div class=\'quotetop\']QUOTE(SkullMaster @ May 17 2006, 12:48 PM) [snapback]374717[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can anyone tell me if there is a mysql command to search for a row number in a mysql table? im working on a file upload site and displaying the file info. I recently added the admin's delete feature that deletes the row from the mysql table, and now i have missing rows and get errors when i try to display the file info.
[/quote]
How is that even possible? What query are you running that returns deleted rows?

Share this post


Link to post
Share on other sites
i got it working. i queried for a row with the id then checked the number of rows returned. 0=doesnt exist and 1=exists :)

Share this post


Link to post
Share on other sites

×

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.