Re: parse error driving me nuts ...

From: Date: Thu, 15 Feb 2001 15:40:45 +0000
Subject: Re: parse error driving me nuts ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39918@lists.php.net to get a copy of this message
> hi, can anyone help me spot the parse error? > It's throwing up on the first "if" line, and for the life of me I cannot > find it! :) > > tia, > andrew > > <?php > > include("db_connect_params.inc"); > $sql="select path from PHOTO where pid =1"; > $link_id = mysql_connect($host, $usr, $pass); > $result = mysql_db_query($database, $sql, $link_id) or die("no result"); > > if ((mysql_num_rows($result)) = 1) Well I don't know if it will give a parse error or not, but you have made the oh way too common C error in your IF statement. > if ((mysql_num_rows($result)) = 1) should be: if ((mysql_num_rows($result)) == 1) - John Vanderbeck - Admin, GameDesign

« previous php.general (#39918) next »