Re: invert
| From: | Richard Lynch | Date: | Sat, 27 Aug 2005 00:09:33 +0000 |
| Subject: | Re: invert | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221458@lists.php.net to get a copy of this message | ||
On Thu, August 25, 2005 2:38 pm, George B wrote:
>> mysql_query('SELECT * FROM table ORDER BY increment_field DESC');
Remember when I told you that you should consistently use:
mysql_query(...) or die(mysql_error());
so that MySQL would TELL you what the error was?
I meant it when I said that.
Because otherwise you're going to post to this list EVERY time you
make a simple mistake in SQL, and people will stop ignoring you
because you don't listen to what we tell you :-)
> If I do that... then i get this error
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result resource in myfile name on line 30
>
> and on line 30 it says
>
> while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
Although it's also possible in this case that you simply didn't put:
$result = mysql_query(...);
so $result has *NOTHING* in it.
--
Like Music?
http://l-i-e.com/artists.htm