ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-db
php-db
RE: [PHP-DB] delte stmt problem with joins
by Hutchins, Richard other posts by this author
Aug 29 2003 2:10PM messages near this date
RE: [PHP-DB] another PHP Sql question... | Re: [PHP-DB] [SPAM?] [PHP-DB] Re: That movie
>  >  Error:  1064 You have an error in your SQL syntax near 'pi 
>  INNER JOIN 
>  > table2 AS p ON p.ID = pi.product_id WHERE p.ow' at line 3

pi() is a mysql function that returns the value of pi. Could the pi in your
query be causing some confusion? It seems that MySql may be expecting pi()
not pi.productID.

Just a guess since it's a syntax error.

>  -----Original Message-----
>  From: John W. Holmes [mailto:holmes072000@[...].net]
>  Sent: Friday, August 29, 2003 9:55 AM
>  To: news.groups@[...].de
>  Cc: php-db@[...].net
>  Subject: Re: [PHP-DB] delte stmt problem with joins
>  
>  
>  Merlin wrote:
>  
>  > Hi John,
>  > 
>  > I am using MySQL 3.x
>  > My guess is that it does not support a query like this. If 
>  so, I am sure 
>  > that there is a workaround I just dont know about. The 
>  values $tablex 
>  > are present.
>  > 
>  > This is the error msg:
>  > 
>  >  Error:  1064 You have an error in your SQL syntax near 'pi 
>  INNER JOIN 
>  > table2 AS p ON p.ID = pi.product_id WHERE p.ow' at line 3
>  
>  
>  There is no work around. You must first select the numbers 
>  you want to 
>  match, store them in PHP, then issue a delete query using 
>  those numbers 
>  from php.
>  
>  -- 
>  ---John Holmes...
>  
>  Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>  
>  php|architect: The Magazine for PHP Professionals – www.phparch.com
>  
>  -- 
>  PHP Database Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>  

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved