php-db | 2004071
Date: 07/14/04
- Next message: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Previous message: Torsten Roehr: "[PHP-DB] Re: query problem.."
- In reply to: Torsten Roehr: "[PHP-DB] Re: query problem.."
- Next in thread: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Reply: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thank you Torsten ,
They're backticks, and I get the same error after removing them.
Any other ideas?
-Micah
On Wednesday 14 July 2004 11:48, Torsten Roehr wrote:
> "Micah Stevens" <micah <email protected>> wrote in message
> news:200407141141.15947.micah <email protected>
>
> > Hi,
> >
> > I'm getting an unknown colum `num` in where clause error with this query:
> >
> > $options = mysql_query("select options.*,
> > count(option_items.optionID) as `num`
> > from options
> > left join option_links using (optionID)
> > left join option_items on options.optionID = option_items.optionID
> > where option_links.productID = '$productID'
> > and `num` > 0");
> >
> > But I'm defining it with the agregate function in the second line.. Any
>
> idea
>
> > why it's popping the error?
> >
> > -Micah
>
> Remove the quotes around num and try again.
>
> Regards, Torsten Roehr
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Previous message: Torsten Roehr: "[PHP-DB] Re: query problem.."
- In reply to: Torsten Roehr: "[PHP-DB] Re: query problem.."
- Next in thread: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Reply: Torsten Roehr: "Re: [PHP-DB] Re: query problem.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

