Re: [PHP-DB] Problem with this query?

2004-08-02 Thread John Holmes
Dylan Barber wrote:
4.0.16
Quote: Starting with MySQL 4.1, all subquery forms and operations that 
the SQL standard requires are supported, as well as a few features that 
are MySQL-specific.

http://dev.mysql.com/doc/mysql/en/Subqueries.html
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Problem with this query?

2004-08-02 Thread Dylan Barber
Sorry wrong line

4.0.16

Dylan Barber

www.codegalaxy.com - A webservices company 

DotNetNuke Portal  Specialists

Simple Affordable & Reliable - Web Design, and Programming 

 

> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 03, 2004 12:19 AM
> To: Dylan Barber
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Problem with this query?
> 
> Dylan Barber wrote:
> > Okay maybe its late or something but this should work, 
> however I get 
> > this
> > 
> > #1064 - You have an error in your SQL syntax.  Check the 
> manual that 
> > corresponds to your MySQL server version for the right 
> syntax to use 
> > near 'SELECT tblVideos.PerformerID
> > 
> > FROM tblVideos
> > 
> > WHERE 1  =1 AND tbl
> > 
> > 
> > 
> > Anybody got a good clue whats wrong with this SQL?
> > 
> > SELECT tblPerformers.ID, tblPerformers.StageName, 
> tblPics.PicName FROM 
> > tblPerformers, tblPics WHERE 1 =1 AND tblPerformers.ID = 
> > tblPics.PerformerID AND tblPics.Active = 'yes' AND tblPics.Type = 
> > 'name' AND tblPerformers.ID IN ( SELECT UNIQUE 
> tblVideos.PerformerID 
> > FROM tblVideos WHERE 1 =1 AND tblVideos.Active = 'yes') ORDER BY 
> > tblPics.ID DESC LIMIT 0 , 6
> 
> What version of MySQL are you using? It looks like you're 
> using a version that doesn't support sub selects.
> 
> -- 
> 
> John Holmes
> 
> php|architect - The magazine for PHP professionals - 
> php|http://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



RE: [PHP-DB] Problem with this query?

2004-08-02 Thread Dylan Barber
2.5.4 - the docs imply it does

Dylan Barber

www.codegalaxy.com - A webservices company 

DotNetNuke Portal  Specialists

Simple Affordable & Reliable - Web Design, and Programming 

 

> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 03, 2004 12:19 AM
> To: Dylan Barber
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Problem with this query?
> 
> Dylan Barber wrote:
> > Okay maybe its late or something but this should work, 
> however I get 
> > this
> > 
> > #1064 - You have an error in your SQL syntax.  Check the 
> manual that 
> > corresponds to your MySQL server version for the right 
> syntax to use 
> > near 'SELECT tblVideos.PerformerID
> > 
> > FROM tblVideos
> > 
> > WHERE 1  =1 AND tbl
> > 
> > 
> > 
> > Anybody got a good clue whats wrong with this SQL?
> > 
> > SELECT tblPerformers.ID, tblPerformers.StageName, 
> tblPics.PicName FROM 
> > tblPerformers, tblPics WHERE 1 =1 AND tblPerformers.ID = 
> > tblPics.PerformerID AND tblPics.Active = 'yes' AND tblPics.Type = 
> > 'name' AND tblPerformers.ID IN ( SELECT UNIQUE 
> tblVideos.PerformerID 
> > FROM tblVideos WHERE 1 =1 AND tblVideos.Active = 'yes') ORDER BY 
> > tblPics.ID DESC LIMIT 0 , 6
> 
> What version of MySQL are you using? It looks like you're 
> using a version that doesn't support sub selects.
> 
> -- 
> 
> John Holmes
> 
> php|architect - The magazine for PHP professionals - 
> php|http://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



Re: [PHP-DB] Problem with this query?

2004-08-02 Thread John Holmes
Dylan Barber wrote:
Okay maybe its late or something but this should work, however I get this
#1064 - You have an error in your SQL syntax.  Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'SELECT tblVideos.PerformerID
FROM tblVideos
WHERE 1  =1 AND tbl

Anybody got a good clue whats wrong with this SQL?
SELECT tblPerformers.ID, tblPerformers.StageName, tblPics.PicName
FROM tblPerformers, tblPics
WHERE 1 =1 AND tblPerformers.ID = tblPics.PerformerID AND tblPics.Active =
'yes' AND tblPics.Type = 'name' AND tblPerformers.ID
IN ( SELECT UNIQUE tblVideos.PerformerID
FROM tblVideos
WHERE 1 =1 AND tblVideos.Active = 'yes')
ORDER BY tblPics.ID DESC 
LIMIT 0 , 6 
What version of MySQL are you using? It looks like you're using a 
version that doesn't support sub selects.

--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Problem with this query?

2004-08-02 Thread Dylan Barber
Okay maybe its late or something but this should work, however I get this

#1064 - You have an error in your SQL syntax.  Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'SELECT tblVideos.PerformerID

FROM tblVideos

WHERE 1  =1 AND tbl



Anybody got a good clue whats wrong with this SQL?

SELECT tblPerformers.ID, tblPerformers.StageName, tblPics.PicName
FROM tblPerformers, tblPics
WHERE 1 =1 AND tblPerformers.ID = tblPics.PerformerID AND tblPics.Active =
'yes' AND tblPics.Type = 'name' AND tblPerformers.ID
IN ( SELECT UNIQUE tblVideos.PerformerID
FROM tblVideos
WHERE 1 =1 AND tblVideos.Active = 'yes')
ORDER BY tblPics.ID DESC 
LIMIT 0 , 6 

 
Dylan Barber

 
 www.codegalaxy.com - A webservices company 

DotNetNuke Portal  Specialists

Simple Affordable & Reliable - Web Design, and Programming