Re: Re: \Z characters
| From: | Jason Wong | Date: | Mon, 23 Dec 2002 04:41:48 +0000 |
| Subject: | Re: Re: \Z characters | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129139@lists.php.net to get a copy of this message | ||
On Sunday 22 December 2002 22:14, Dave J. Hala Jr. wrote:
> This field contains ONLY the \Z. Thanks for the suggestion but it
> generates the following error message:
>
> Parse error: parse error, unexpected '\"' in
>
> On Sun, 2002-12-22 at 04:49, Mattia wrote:
> > "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\%"
Try:
$SQL = "SELECT id,PVLN from lhpl_side WHERE PVLN = '\\Z'";
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Someone else stole your IP address, call the Internet detectives!
*/