|
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
Navigation:
[Reply to this message]
|