Posted by Ed Murphy on 02/14/07 05:48
Erland Sommarskog wrote:
> kirke (hinkyeol@gmail.com) writes:
>> Hi I wanna put string in query "where" part.
>>
>> For example,
>>
>> $sql="select VEHICLE
>> FROM database
>> WHERE MECHANIC =BRIAN
>> ";
>>
>> like above, "mechanic" column is filled with strings. Then how can I
>> write "where" part?
>> Above query does not work.
>
> Does this:
>
> $sql="select VEHICLE FROM database WHERE MECHANIC = 'BRIAN';
Should be
$sql="select VEHICLE FROM database WHERE MECHANIC = 'BRIAN'";
(Normally, I would assume that the user would figure this out,
but in this case the original poster appears to still be at the
stage of struggling with the basics.)
[Back to original message]
|