Jump to content


Photo

MySQL Query Problems


  • This topic is locked This topic is locked
No replies to this topic

#1 Mr. Matt

Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 28 August 2007 - 08:32 AM

Hey

Just a brief reminded for people when it comes to asking a question about why they are getting an error like:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in some location on line 674678


There is an inbuilt php function to tell you what the mysql error is which is very simple to use and will tell you what is wrong, and that is mysql_error.

Simple usage:

$my_query = mysql_query( "SELECT `forename`, `surname` FROM `names` ORDER BY `surname` ASC" ) or die( mysql_error() );

If you don't understand what the error means then do a forum search for it as it is more then likely it will be in here already. If you still can't find it, then by all means post and someone will be able to help you out :P

Matt
  • walterdavid likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users