Howto search in SQL for a specific character?
| From: | Gustav Wiberg | Date: | Tue, 29 Nov 2005 20:55:27 +0000 |
| Subject: | Howto search in SQL for a specific character? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-226599@lists.php.net to get a copy of this message | ||
Hi there!
in PHP i Write..
$v1 = chr(39); //39 is apostrofe
$sql = "SELECT nameOfPedigree FROM tbpedigrees WHERE SUBSTR(nameOfPedigree,0,1) = $v1";
Why doesn't this work?
I want the sql to select all nameOfPedigree - fields where the first character is apostrofe (')
/G
http://www.varupiraten.se/