Re: Sybase Query- Problems with Pound Sign

From: Date: Wed, 06 Aug 2003 09:06:54 +0000
Subject: Re: Sybase Query- Problems with Pound Sign
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29718@lists.php.net to get a copy of this message
Try: $sql = "select * from item where \"bib#\" = 300"; ----- Original Message ----- From: "Jeremy Peterson" <jeremy.peterson@moody.edu> To: "PHP DB" <php-db@lists.php.net> Sent: Wednesday, August 06, 2003 4:34 AM Subject: [PHP-DB] Sybase Query- Problems with Pound Sign > I am having a problem with a query that has a pound sign in it. The > results are quite puzzling, it seems like the page doesn't load if the > query is present. I have tested this on other tables without the pound > sign and they work beautifully, seems like the pound sign is the > troublemaker to me. > > Printing $sql returns the proper sql statement, so what is the sybase_query > function doing to the variable? > > My code is at the bottom of this page. > > Thanks, > > Jeremy > > > > <?php > include "$DOCUMENT_ROOT/include/sybase.inc"; > > $syb_connect = syb_connect($syb_server, $syb_user, $syb_pw); > > $sql = "select * from item where bib# = 300"; > print "sql=$sql"; > $result = sybase_query($sql); > > //print "someting"; > while($row = Sybase_Fetch_Assoc($result)){ > extract($row); > print "$tag $text<br>"; > > } > > > ?> > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#29718) next »