= 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
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
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
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
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
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
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
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
, 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
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
)
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
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
12 matches
Mail list logo