Reply to Re: form problem (?)

Your name:

Reply:


Posted by Senator Jay Billington Bulworth on 10/10/74 11:22

"Konrad Tuszkowski" <konrad.t@op.pl> wrote in
news:dc3a99$8b9$1@news.onet.pl:

> $query ="SELECT matom,nazwa FROM chem WHERE symb LIKE '$A' OR symb
> LIKE '$B' OR symb LIKE
>
> '$C' OR symb LIKE '$D' OR symb LIKE '$E'";

I don't know if this is the problem or not, but typically you would use
the wildcard % with a LIKE statement:

SELECT matom,nazwa FROM chem WHERE symb LIKE '%$A%' OR ...

Right now, your select statement is only finding _exact matches_ of $A,
$B, $C, $D, and $E.

hth

[followup set to alt.php]

--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources

[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

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