RE: [PHP-WIN] Re: PHP Search DB Table

Oliver Kennedy <[email protected]>
Newsgroups gmane.comp.php.database,gmane.comp.php.windows
Message-ID <[email protected]>
David, Sascha thank you both for your help. Using the query 
 
$query = "SELECT * FROM clients WHERE clientid = '$term'";
echo $query . '<br />';
$result = mysql_query($query);

as suggested printed out the below
 
SELECT * FROM clients WHERE clientid = ''

 This seems to indicate that it is not seeing the value within the single quotes. However a slight caveats to that
If I change what is contained within the quotes to a specific number then it does read it, for example
 
SELECT * FROM clients WHERE clientid = '123456';

So it is only when I enclose a value that it doesn't compute, I tried putting the $term within %% like so
 
$query = "SELECT * FROM clients WHERE clientid = '%".$term"%'";
 
however this just returns we page not found, possibly because I need to use the LIKE parameter in there somewhere?
 
Many thanks for all your help on this
 
Kind Regards
 
Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.