Re: \Z characters
| From: | Mattia | Date: | Sun, 22 Dec 2002 10:49:08 +0000 |
| Subject: | Re: \Z characters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129111@lists.php.net to get a copy of this message | ||
"Dave J. Hala Jr." <dave@58ghz.net> ha scritto nel messaggio
news:1040500684.942.130.camel@badboy...
> I've got a bunch of fields in a mysql database that have a \Z character
> in them. I want to search a field for \Z and if it contains that
> character, make the field blank.
>
> In running php 4.x on RH 8.0
>
> Here is the code:
>
> $connection = db_connect("Could not connect DB");
> $SQL="SELECT id,PVLN from lhpl_side WHERE PVLN =\"\\Z\" ";
> $result= mysql_query($SQL,$connection) or die (mysql_error());
> $num = mysql_numrows($result);
You are looking for a field that is a string and consist of a \Z character!
not more not less. I don't understand if this is what you want or you want
to find all fields that CONTAIN a \Z in any position. In this case the
correct query would be
select id,PVLN from lhpl_side WHERE PVLN LIKE \"%\\Z\%"
mATTIA cAZZOLA