Re: Sybase Query- Problems with Pound Sign

From: Date: Wed, 06 Aug 2003 02:46:08 +0000
Subject: Re: Sybase Query- Problems with Pound Sign
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-29711@lists.php.net to get a copy of this message
Yep, I wish I could name the fields, but alas it is not my database application. For some reason it works... :) When I use isql it works as expected, thus the problem. At 10:41 PM 8/5/2003 -0400, John W. Holmes wrote:
Jeremy Peterson wrote:
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.
[snip]
$sql = "select * from item where bib# = 300";
The # character is generally used to start comments, so everything after it is ignored in your query. I'm surprised you could even name a column like that... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals ­ www.phparch.com


« previous php.db (#29711) next »