RE: [PHP-DB] MySQL / PHP Database Help

From: Date: Fri, 08 Feb 2002 14:50:30 +0000
Subject: RE: [PHP-DB] MySQL / PHP Database Help
Groups: php.db 
Request: Send a blank email to php-db+get-16683@lists.php.net to get a copy of this message
You don't need to use var_dump. Just use the following statements: $newquery = mysql_query("SELECT * FROM local_shows WHERE show_date='$row[show_date]' AND venue='$row[venue]'"); print $newquery; -----Original Message----- From: Jonathan Underfoot [mailto:jonathan@underfoot.cc] Sent: Friday, February 08, 2002 8:48 AM To: Jeroen Timmers Cc: [PHP-DB] Subject: Re: [PHP-DB] MySQL / PHP Database Help What does bool(false) mean? Thats off the vardump.... -J ----- Original Message ----- From: "Jeroen Timmers" <jeroen@start4me.nl> To: "Jonathan Underfoot" <jonathan@underfoot.cc> Cc: "[PHP-DB]" <php-db@lists.php.net> Sent: Friday, February 08, 2002 8:58 AM Subject: Re: [PHP-DB] MySQL / PHP Database Help > Hello, > > something that you can help is the follow > > try var_dump($newquery); > > then you see the complete query and run it in phpmyadmin. > Jeroen > ----- Original Message ----- > From: "Jonathan Underfoot" <jonathan@underfoot.cc> > To: <php-db@lists.php.net> > Sent: Friday, February 08, 2002 2:43 PM > Subject: [PHP-DB] MySQL / PHP Database Help > > > I'm trying to write a script that checks for multiple entries on a table in > a database. So far I've been plagued by MySQL errors. I'm fairly confident > my scripting is ok (Then again, I've been wrong before.) I think moreover > there might be some difficulty with my theory. Then again, I could try and > do this with MySQL join statements. Any feedback would be appreciated. > > $sqlquery = mysql_query("SELECT * FROM local_shows"); > > while ($row = mysql_fetch_array($sqlquery)) { > > $newquery = mysql_query("SELECT * FROM local_shows WHERE > show_date='$row[show_date]' AND venue='$row[venue]'"); > > var_dump($newquery); /* for example to see the query */ > > while ($row2 = mysql_fetch_array($newquery)) { > > $num_rows = mysql_num_rows($row2); > > if ($num_rows>1) { > > print "etc etc" (Do things with my $row2 data) > > > I get loads of: > > Warning: Supplied argument is not a valid MySQL result resource in > /home/ufr2/underfoot-www/admin/dupeshows.html on line 51 > > > Can you not reselect in another while while selecting? Does that make any > sense to anyone but me? I shouldent have to open another DB connection? > > Anyhow... your I would appreciate any help. > > -Jonathan > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#16683) next »