Many thanks Chris.
Tony
---
[This E-mail scanned for viruses by IAS, an Archiventure Company]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I might be misinterpreting the question, because it sounds like the same
question as before. Let me try to be more thorough.
SQL statements traditionally use single quotes around literal values.
There is no reason of "escaping" that makes this characteristic exist.
Now, in PHP, most people con
Chris,
Maybe I didn't make myself clear...
"LIKE '%"// Beginning of double quote and then beginning single quote
beacuse it is the beginning of a string which then ends before the variable
$searchterm.
..
Is the reason that the is a si
Each item within double quotes is a literal string. The example you
inquire about dynamically builds an SQL statement.
For example, if $searchtype is "author_name" and $searchterm is
"Rasmus", then you would build a statement like:
select * from books where author_name like '%Rasmus%';
The SQ
I want to make sure about the syntax using mysql and PHP.
Here is the line of code:
$query="SELECT * FROM books WHERE ". $searchtype. " LIKE '%" .$searchterm.
"%' ";
.
Am I correct that the reason for the single quote within the expression
above is th
5 matches
Mail list logo