httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Subject Re: [users@httpd] PHP CODE DRIVING ME NUTS
Date Tue, 03 Sep 2002 08:39:18 GMT

It's the space in $bar. I.e. your sequel statement is (assuming
$SELECT='SELECT';)

	SELECT * FROM review WHERE bar_name=The Beverage

rather than

	SELECT * FROM review WHERE bar_name="The Beverage"
	SELECT * FROM review WHERE bar_name='The Beverage'

Just put the quotes in the string, escaped if needed.

Dw.

On Mon, 2 Sep 2002, Grant Cooper wrote:

> $bar = "The Beverage";
> $SQL = "$SELECT * FROM review WHERE bar_name=$bar";
>
> When sql executes the statement is kills off the "The" part.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message