Re: Something Stupid

From: Date: Wed, 07 Feb 2001 12:03:39 +0000
Subject: Re: Something Stupid
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6444@lists.php.net to get a copy of this message
I told you it was something stupid! That was it. Thank you. Its good to be able to bounce this stuff off of someone. I'm surprised that doesn't generate a parse error. Sometimes we just get so wrapped up in it, that it takes another set of eyes to see the forest for the trees. Curtis ----- Original Message ----- From: "Jason Beebe" <jbeebe@op480.com> To: "Curtis Maurand" <curtis@canon.maurand.com>; <php-db@lists.php.net> Sent: Wednesday, February 07, 2001 1:57 AM Subject: RE: [PHP-DB] Something Stupid > drop the ; from the while. it is not parsing anything within the scope of > the while loop because there is a ; saying the while loop ends w/o doing > anything. > > -----Original Message----- > From: Curtis Maurand [mailto:curtis@canon.maurand.com] > Sent: Tuesday, February 06, 2001 9:39 PM > To: php-db@lists.php.net > Subject: [PHP-DB] Something Stupid > > > I have got to be doien something stupid. > > consider the following code. > hosts, usernames and passwords have been changed to protect the innocent. > > <? > $mysql_link = > mysql_connect("myhost.domain.com","some.user","some.password " > $myquery = "select car_no,drv_name from cars order by car_no + 0"; > $myresult = mysql_db_query("topten", $myquery, $mysql_link); > while($rows = mysql_fetch_array($myresult)); > { > print("$rows[0]<br>\n"); > } > ?> > > I get no output and no errors. I use code almost identical to this all over > the place, yet this one doesn;t work. > I've tried just a bare qery and I still get nothing. the connection is > working as we can see from the log entry below. At this point, I'm lost. > If the technique I'm using is considered bad practice, I'm open to > suggestions. My code would normally print out a table, but for the sake of > trouble shooting, I reduced it to this which should print a single column of > numbers. > > Anyone have any ideas? > > the mysqld.log records the query. > > 010206 22:59:55 310 Connect some.user@another.host.mydomain on > 310 Init DB topten > 310 Query select car_no, drv_name from cars order > by car_no + 0 > 310 Quit > >

« previous php.db (#6444) next »