corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » mysql function help :D » Post Reply

Post Reply
Who Can Post? All users can post new topics and all users can reply.
Icon:
Formatting Mode:
Normal
Advanced
Help

Insert Bold text Insert Italicized text Insert Underlined text Insert Centered text Insert a Hyperlink Insert Email Hyperlink Insert an Image Insert Code Formatted text Insert Quoted text
Message:
HTML is Off
Smilies are On
BB Code is On
[img] Code is On
Post Options: Disable smileys?
Turn BBCode off?
Receive email notification of new replies?

waynep

posted on 20th Jul 03 at 20:59

yup
i hav now changed part of the query to

while($newObject=$DB_site->fetch_array($newestsql)) {

so the FULL query is now



$newestsql=$DB_site->query("SELECT * FROM gal_Object where Freigabe='y' order by newat desc limit 1");
while($newObject=$DB_site->fetch_array($newestsql)) {
$getnewthumb=$DB_site->query_first("SELECT * FROM gal_Pictures where Object='$newObject[ID]' ORDER BY rand() DESC LIMIT 1");
// get a random pic of the car
$tmpnew=explode(".",$getnewthumb[filename]);
$newthumbfilename="gt_".$tmpnew[0].".jpg";
eval( '$newestsql = "' . gettemplate( 'home_newest' ) . '";' );
}


Joff

posted on 20th Jul 03 at 20:50

Have you printed out the contents of $newestsql?

See what you're trying to pass to mysql_fetch_array.


waynep

Icon depicting mood of post posted on 20th Jul 03 at 20:07

im running a query and i hav an error on this line

while($newObject= mysql_fetch_array($newestsql)) {

this is the error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource