error message problem!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cooper3000
Forum Newbie
Posts: 8
Joined: Wed Jan 18, 2006 5:16 am
Location: London

error message problem!

Post by cooper3000 »

Warning: mysql_data_seek(): Offset 0 is invalid for MySQL result index 2 (or the query data is unbuffered) in C:\....

this error only occurs when there is no result found, what can i do to sort this?

cheers

Cooper
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

You could check the result of your initial query to see how many rows were returned using mysql_num_rows($result)
and only if it is > 0 execute mysql_data_seek();

It's hard for me to tell when you haven't shown any of your code.
Post Reply