MySQL / PHP Database Help

From: Date: Fri, 08 Feb 2002 13:43:05 +0000
Subject: MySQL / PHP Database Help
Groups: php.db 
Request: Send a blank email to php-db+get-16671@lists.php.net to get a copy of this message
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]'"); 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

« previous php.db (#16671) next »