Ah thank you Jon!  I was using double quotes (tried with and without escape
slashes).  Forgot about single quotes compeletly...

- seb

-----Original Message-----
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 21:12
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Why doesn't this simple query work?


hmmm i think you need to always have quotes around string regardless of if
they are variables . .  .
$result = mysql_query("SELECT shootID FROM shoots WHERE
(location='$location')");

----- Original Message -----
From: "Seb Frost" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 3:10 AM
Subject: [PHP] Why doesn't this simple query work?


> Driving me mad.  Works if I put a string in quote marks instead of the
> variable $location.
>
>
> $result = mysql_query("SELECT shootID FROM shoots WHERE
> (location=$location)");
>
>
> This should work shouldn't it?  If it's a problem with the variable being
> embedded in the query what's the easiest way to overcome this?
>
> cheers,
>
> seb
>
> -----Original Message-----
> From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
> Sent: 19 July 2001 14:50
> To: php-general
> Subject: Re: [PHP] REGEXP
>
>
> I am not sure if I am understanding you... but if you just want to return
> the boundary try
>
> preg_match("|boundary=\"([^\"].+)\"|Uis", $text, $regs );
> $boundary = $regs[1];
>
> I am guessing that you want the boundary from the lines
> > to avoid regexp (too lazy) but now I want to use it.  The final result I
> > would need is: ------------B42DA66C4EC07C9B572A58FC so that I can search
>
> If you are looking for something else let me know
> Sheridan
>
> > -----Original Message-----
> > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 14, 2001 2:54 AM
> > To: php general list
> > Subject: [PHP] REGEXP
> >
> > Hi,
> >
> > I am trying to capture the Header from a mail for my webmail using php
> > and
> > pop3.  The header is something like this:
> > Content-Type: multipart/mixed;
> >  boundary="------------B42DA66C4EC07C9B572A58FC"
> >
> > When I use preg_split("/[\d;]*/", $buffer), I get
> > Content-Type: multipart/mixed;
> >
> > What I want is to return the whole line split by the ";".  I usually try
> > to avoid regexp (too lazy) but now I want to use it.  The final result I
> > would need is: ------------B42DA66C4EC07C9B572A58FC so that I can search
> > in the body of the message for the rest of the parts.
> >
> > Any pointers would be helpful.
> >
> > Adrian
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to