Reply to Re: in query, how can I compare string?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация