you need to print the qeury and i guess you print the result in the var_dump

i use always var_dump instead a print because the var_dump have more info.

jeroen
----- Original Message -----
From: "Jonathan Underfoot" <[EMAIL PROTECTED]>
To: "Jeroen Timmers" <[EMAIL PROTECTED]>
Cc: "[PHP-DB]" <[EMAIL PROTECTED]>
Sent: Friday, February 08, 2002 3:47 PM
Subject: Re: [PHP-DB] MySQL / PHP Database Help


> What does bool(false) mean?
>
> Thats off the vardump....
>
> -J
>
> ----- Original Message -----
> From: "Jeroen Timmers" <[EMAIL PROTECTED]>
> To: "Jonathan Underfoot" <[EMAIL PROTECTED]>
> Cc: "[PHP-DB]" <[EMAIL PROTECTED]>
> 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" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > 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
>
>


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

Reply via email to