RE: select statement with variable for table_reference?

2007-06-28 Thread Price, Randall
= join " union ", "(select id, title, from $_)"; } $sql .= " where ... order by ... limit ..."; So the sql query will search only in the needed tables. Octavian - Original Message - From: "Ed Lazor" <[EMAIL PROTECTED]> To: "'Octav

Re: select statement with variable for table_reference?

2007-06-27 Thread Octavian Rasnita
From: "Ed Lazor" <[EMAIL PROTECTED]> To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 27, 2007 8:02 PM Subject: RE: select statement with variable for table_reference? Hi Octavian, First, thanks for helping

RE: select statement with variable for table_reference?

2007-06-27 Thread Ed Lazor
t; Octavian > > - Original Message - > From: "Ed Lazor" <[EMAIL PROTECTED]> > To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; > Sent: Tuesday, June 26, 2007 11:37 PM > Subject: RE: select statement with variable for tab

RE: select statement with variable for table_reference?

2007-06-27 Thread Price, Randall
ogy 1700 Pratt Drive Blacksburg, VA 24060 Email: [EMAIL PROTECTED] Phone: (540) 231-4396 -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 6:02 PM To: Price, Randall; mysql@lists.mysql.com Subject: RE: select statement with variable for table_refe

Re: select statement with variable for table_reference?

2007-06-26 Thread Octavian Rasnita
o: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; Sent: Tuesday, June 26, 2007 11:37 PM Subject: RE: select statement with variable for table_reference? Ok, I used your approach like this: -- select i.scanned_barcode

RE: select statement with variable for table_reference?

2007-06-26 Thread Ed Lazor
Implementation Group > Virginia Tech Information Technology > 1700 Pratt Drive > Blacksburg, VA 24060 > > Email: [EMAIL PROTECTED] > Phone: (540) 231-4396 > > -Original Message- > From: Ed Lazor [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2007 4:37 PM

RE: select statement with variable for table_reference?

2007-06-26 Thread Ed Lazor
Thanks for the info Jerry. =) > -Original Message- > From: Jerry Schwartz [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2007 1:59 PM > To: 'Ed Lazor'; 'Octavian Rasnita'; mysql@lists.mysql.com > Subject: RE: select statement with variable for ta

RE: select statement with variable for table_reference?

2007-06-26 Thread Price, Randall
vian Rasnita'; mysql@lists.mysql.com Subject: RE: select statement with variable for table_reference? Ok, I used your approach like this: -- select i.scanned_barcode, v.title from inventory as i left join version as v on i.record_id = v.id wher

RE: select statement with variable for table_reference?

2007-06-26 Thread Jerry Schwartz
, 2007 4:37 PM > To: 'Octavian Rasnita'; mysql@lists.mysql.com > Subject: RE: select statement with variable for table_reference? > > Ok, I used your approach like this: > > -- > select i.scanned_barcode, v.tit

RE: select statement with variable for table_reference?

2007-06-26 Thread Ed Lazor
has something in there or not. Improving on this idea would be finding a way to just query the relevant tables... some sort of conditional union. Any ideas? -Ed > -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2007 1:02 PM > To: E

Re: select statement with variable for table_reference?

2007-06-26 Thread Octavian Rasnita
) where ... order by ... limit ...; Octavian - Original Message - From: "Ed Lazor" <[EMAIL PROTECTED]> To: Sent: Tuesday, June 26, 2007 10:39 PM Subject: select statement with variable for table_reference? Is there a way to get something like this to work? Set @tname="mytab

select statement with variable for table_reference?

2007-06-26 Thread Ed Lazor
Is there a way to get something like this to work? Set @tname="mytable"; Select * from @tname; Here's what I'm trying to really accomplish in case there is yet another way to approach this... I have to work with product data from multiple databases and multiple tables. For example, one databas