Re: What's wrong with this mysql statement?

  • From: BlueScale <bluescale1976@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Mon, 18 Aug 2008 00:04:44 -0400

ah-ha!
Thanks, I didn't even think about that. :)

On Mon, 2008-08-18 at 09:26 +0530, Niran wrote:
> Change it to the following:
> $x = 0;
> "SELECT name, email, age FROM contacts ORDER BY age DESC LIMIT " .
> $x . "," . ($x+29)
> The $x + 29 should be enclosed in (), that way the adition will be
> performed first and then added to the sql string after automaticly
> converting it to string.
> HTH
> Nirandas
> Website: http://www.nirandas.com
>         ----- Original Message ----- 
>         From: BlueScale 
>         To: programmingblind@xxxxxxxxxxxxx 
>         Sent: Monday, August 18, 2008 9:11 AM
>         Subject: What's wrong with this mysql statement?
>         
>         
>         
>         This is a piece of code from a php script I am working on.
>         The mysql statement keeps giving me an error "not a valid
>         result".
>         $x = 0;
>         SELECT name, email, age FROM contacts ORDER BY age DESC LIMIT
>         " . $x . "," . $x+29
>         Thanks
>         BlueScale
>         

Attachment: stock_smiley-1.png
Description: PNG image

Other related posts: