Re: Rewriting subquery for old MySQL - SOLVED - correction!

2005-12-06 Thread Alex Gemmell
Alex Gemmell wrote: > Thanks Micheal - yeah, I managed to figure out the CREATE_TMP_TABLE privilage problem myself. I should have used those "die on errors" too - will do next time! To recap here's the working final solution (after MySQL User has CREATE_TMP_TABLES and DROP privilages): [PHP

Re: Rewriting subquery for old MySQL - SOLVED

2005-11-30 Thread Alex Gemmell
Michael Stassen wrote: Alex Gemmell wrote: Thanks Shawn but I couldn't seem to get this to work. I made the point of checking the MySQL User that PHP connects with. I gave it CREATE and DROP privilages on the database schema in question. It previously only had SELECT privilages. From

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Michael Stassen
Alex Gemmell wrote: The error I get whichever way I tried it was the same: [ERROR] Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\alexg\newcs\phpinc\status-Trans.php on line 72 [/ERROR] The line number always correlated to this bit of PHP code: $resu

Re: Rewriting subquery for old MySQL

2005-11-30 Thread SGreen
rouvas <[EMAIL PROTECTED]> wrote on 11/30/2005 10:18:33 AM: > On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: > > [EMAIL PROTECTED] wrote: > > > Alex Gemmell <[EMAIL PROTECTED]> wrote on 11/30/2005 10:06:09 AM: > > >>Hi, > > >> > > >>Unfortunately I need to use a query on an old MySQL (4.

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Michael Stassen
Alex Gemmell wrote: Thanks Shawn but I couldn't seem to get this to work. I made the point of checking the MySQL User that PHP connects with. I gave it CREATE and DROP privilages on the database schema in question. It previously only had SELECT privilages. From the manual

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
rouvas wrote: On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: [EMAIL PROTECTED] wrote: Alex Gemmell <[EMAIL PROTECTED]> wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
Dan Nelson wrote: In the last episode (Nov 30), Alex Gemmell said: I tried splitting up the queries to see if it helped but it didn't work either: [PHP] $query1 = "CREATE TEMPORARY TABLE tmpSubquery SELECT * FROM tblactivities WHERE Assignment_ID='".$row['Assignment_ID']."'

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Dan Nelson
In the last episode (Nov 30), Alex Gemmell said: > I tried splitting up the queries to see if it helped but it didn't > work either: > > [PHP] > $query1 = "CREATE TEMPORARY TABLE tmpSubquery > SELECT * FROM tblactivities > WHERE Assignment_ID='".$row['Assignment_ID']."' > ORDER B

Re: Rewriting subquery for old MySQL

2005-11-30 Thread rouvas
On Wednesday 30 November 2005 18:11, Alex Gemmell wrote: > [EMAIL PROTECTED] wrote: > > Alex Gemmell <[EMAIL PROTECTED]> wrote on 11/30/2005 10:06:09 AM: > >>Hi, > >> > >>Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one > >> > >> > >>I currently have uses a subquery. So it

Re: Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
[EMAIL PROTECTED] wrote: Alex Gemmell <[EMAIL PROTECTED]> wrote on 11/30/2005 10:06:09 AM: Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but not with this 4.0. I have read in the MySQL manual that I

Re: Rewriting subquery for old MySQL

2005-11-30 Thread SGreen
Alex Gemmell <[EMAIL PROTECTED]> wrote on 11/30/2005 10:06:09 AM: > Hi, > > Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one > I currently have uses a subquery. So it works on my 4.1 but not with > this 4.0. I have read in the MySQL manual that I can rewrite subquerie

Rewriting subquery for old MySQL

2005-11-30 Thread Alex Gemmell
Hi, Unfortunately I need to use a query on an old MySQL (4.0.xx) and the one I currently have uses a subquery. So it works on my 4.1 but not with this 4.0. I have read in the MySQL manual that I can rewrite subqueries using joins but I don't see how with this query because I only have one t