![]() |
mysql_fetch_array() error
ok i am getting an error after having this query on my index
this is the error Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /forums/admin/db_mysql.php on line 154 this is the query Code:
$newestsql=$DB_site->query("SELECT * FROM gal_Object where Freigabe='y' order by newat desc limit 1"); this is line 154 Code:
$this->record = mysql_fetch_array($this->query_id); |
Try...
LIMIT 0,1 That's the only thing that jumps out to me. |
Your only fetching one row, hence you should be using query_first and remove the while loop.
|
ok so im now trying
Code:
$newestsql=$DB_site->query_first("SELECT * FROM gal_Object where Freigabe='y' order by newat desc limit 0,1"); if i remove the { i get a Parse error |
Neither of the {} are needed as far as I can see with that code segment.
|
I see Limits which are not needed on query_first.
I see an array element with no single quotes around it. I see order by rand, but rand() will not equate to a field name, just a number. |
Also, a side note: never, ever query in a loop :)
|
Quote:
|
Its not stricly needed, but heres what he means:
PHP Code:
|
:( @ Call to undefined function: mysql_fetch_array()
|
All times are GMT. The time now is 07:08 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|