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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to