Actually this won't work since the actual query never runs....

try:

$sql = "select * from table where bla bla bla";
$rResults = mysql_query( $sql, $dbConnection );
if( mysql_num_rows($rResults) == 0 ) {
         do this;
} else {
         do this;
}


At 11:52 AM 2/20/01 -0500, Brian V Bonini wrote:
>$sql = "select * from table where bla bla bla";
>
>if(!isset($sql)) {
>         do this;
>} else {
>         do this;
>}
>
>I think.... ?
>
>-Brian
>**************
>
> > -----Original Message-----
> > From: Matt Davis [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 20, 2001 11:33 AM
> > To: Php Mailing List
> > Subject: [PHP] redirect if sql = nothing
> >
> >
> > If my SQL returns no results then i want to redirect to a page saying no
> > results etc but if results are found then I want it to continue
> > on down the
> > script how would i do this.
> >
> > Matt.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to