Re: Nested SELECT statements problem

2003-08-03 Thread Adam Fortuno
What version of MySQL are you using? Regards, A$ On Saturday, August 2, 2003, at 11:45 PM, Pascal Délisle wrote: Hi! I try to figure out how to use a nested "SELECT" statement after the "IN" predicate. For example, when I try this code, it doesn't return anything although it should: SELECT b

Re: Nested SELECT statements problem

2003-08-03 Thread Dan Nelson
In the last episode (Aug 03), Pascal Dlisle said: > Finally, I solved my problem by creating a temporary table that holds > the result of the subquery. So, it looks like this: ... > The only problem I see is when there are concurrent access to the > table "livreTemp", e.g. when there are multiple

Re: Nested SELECT statements problem

2003-08-03 Thread Matthew McNicol
= auteur.IDAuteur and livre.IDLivre = livreEcritPar.IDLivre; ++-+--+ | title | Prenom | Nom | +------------+-----+--+ | howto: MySQL | Matthew | Gold | | howto: PHP | Matthew | Gold | | History of Tayport | Matthew | Gold | +---

Re: Nested SELECT statements problem

2003-08-03 Thread Pascal Délisle
ay, August 03, 2003 1:02 PM Subject: Re: Nested SELECT statements problem Finally, I solved my problem by creating a temporary table that holds the result of the subquery. So, it looks like this: CREATE TABLE livreTemp (IDLivre int(11)); INSERT INTO livreTemp (IDLivre) SELECT book.IDLivre FROM li

Re: Nested SELECT statements problem

2003-08-03 Thread Jim McAtee
- Original Message - From: "Pascal Délisle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 1:02 PM Subject: Re: Nested SELECT statements problem > Finally, I solved my problem by creating a temporary table that holds > the result of

Re: Nested SELECT statements problem

2003-08-03 Thread Pascal Délisle
Finally, I solved my problem by creating a temporary table that holds the result of the subquery. So, it looks like this: CREATE TABLE livreTemp (IDLivre int(11)); INSERT INTO livreTemp (IDLivre) SELECT book.IDLivre FROM livre book, livreEcritPar ecr, auteur aut WHERE aut.Prenom like '%$firstNa

Re: Nested SELECT statements problem

2003-08-03 Thread Pascal Délisle
Thanks for your input! First, I removed the quotation marks into the sub-query in order to fix syntax. Then, I tried to use different alliases from the main query. However, this doesn't work. I mean that mySQL return a syntax error. I checked the server version and it is 3.23.56. As someon

RE: Nested SELECT statements problem

2003-08-02 Thread Lin Yu
One problem is that you have quoted your "sub-query", which makes it to return a constant string. Another problem I saw in your code is that you used the same aliases for tables in the query and in the sub-query. In such case, the SQL parser would take all of them to refer to the same table, prob

Re: Nested SELECT statements problem

2003-08-02 Thread Eternal Designs, Inc
Dan Nelson wrote: In the last episode (Aug 02), Pascal Dlisle said: I try to figure out how to use a nested "SELECT" statement after the "IN" predicate. For example, when I try this code, it doesn't return anything although it should: SELECT book.IDLivre, aut.Prenom, aut.Nom FROM livre book,

Re: Nested SELECT statements problem

2003-08-02 Thread Dan Nelson
In the last episode (Aug 02), Pascal Dlisle said: > I try to figure out how to use a nested "SELECT" statement after the > "IN" predicate. For example, when I try this code, it doesn't return > anything although it should: > > SELECT book.IDLivre, aut.Prenom, aut.Nom FROM livre book, > livreEcrit