RE: [PHP-DB] adding the results of a number of calls to mysql_query

2001-09-24 Thread Cable, Christian

thanks for the idea but it was a bit too of a headache in my case as I was
generating the sql statement in a messy way
tho lots of bits of code. Reading an oracle book I came across unions and that
has led me onto what I think will solve my prob

merged tables

I'm going try create table alltables (blah blah...) type=MERGE  UNION
(table00_01, table99_98 etc etc) 

thansk for everyone who gave me hints
cheers

Christian
On Monday, September 24, 2001 10:54 AM, Russ Michell
[SMTP:[EMAIL PROTECTED]] wrote:
> If I have the right end of the stick you want:
> 
> SELECT * FROM table99_98,table00_01 WHERE table99_98.foo='$bar' AND
table00_01.foo='$bar';
> 
> Russ
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] adding the results of a number of calls to mysql_query

2001-09-24 Thread Russ Michell

If I have the right end of the stick you want:

SELECT * FROM table99_98,table00_01 WHERE table99_98.foo='$bar' AND 
table00_01.foo='$bar';

Russ


On Mon, 24 Sep 2001 10:50:02 +0100 "Cable, Christian" <[EMAIL PROTECTED]> wrote:

> system:
> win NT4 server (IIS4, php4)
> 
> Problem:
> I'm writing a web front end to an old in house access database with tables
> split over years
> (rather than the row having what year it's in)
> 
> i.e.
> 
> table00_01 table 99_98 etc etc
> 
> ideally I'd like to run the same query against each table and the fetch rows
> form it the result of
> all the queries.
> 
> any ideas on how I can do this ?
> 
> with thanks
> 
> Christian
> 
> 
> Christian Cable
> ICT Assistant
> Careers Service; Lancaster University
> Tel: (01524) 594072  Fax: (01524) 592072
> http://www.lancs.ac.uk/staff/cable/
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

#---#

  "Believe nothing - consider everything"   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]