Re: syntax error on mysql select statement
| From: | Coskun SUNALI | Date: | Sun, 13 Oct 2002 07:16:13 +0000 |
| Subject: | Re: syntax error on mysql select statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119771@lists.php.net to get a copy of this message | ||
"SELECT * FROM ad AS t1"
Where is the table?
Should be like:
SELECT ad AS t1 FROM table_name Where ...... Limit 0,n
Coskun SUNALI / Turkey
"Pablo Oliva" <poliva@cox.net> wrote in message
news:000101c2726e$c506ee50$6a6c0444@cr8tivewerk...
> Can anyone see any problems with the following:
> SELECT * FROM ad AS t1, ad_location AS t2 ORDER BY t1.ad_ts_update LIMIT
> 0,40 WHERE t1.ad_location = t2.ad_loc_id AND ( (t1.ad_cdl_a = on OR
> t1.ad_cdl_b = on) AND t1.ad_longhaul = on AND t1.ad_fulltime = on ) AND
> ( t2.ca_losangeles = 1 OR t2.ca_santaana = 1 ) AND t1.ad_display = 1
>
> The error I get is:
> You have an error in your SQL syntax near 'WHERE t1.ad_location =
> t2.ad_loc_id AND ( t1.ad_cdl_a = on AND t1.ad_longhaul = ' at line 1
>