First, this is a MySQL Question, next time you better send your request
to a list which covers your type of question.

use tablename.fieldname in your WHERE clause if you have fields with the
same name.

-- red

Dave Carrera wrote:
Hi List,

How do I select data from 24 table in my database.

Each one is identical in structure layout being

Id,name,list

I want to select where like $_POST[var] from a form all of the tables but I
am having trouble :(

I thought making a var string like

$string = "table1,table2,table3,.....";

And doing

(select * from $string where list like \"%$_POST[var]%\");

Would work but I get a MySql error which say "Column: 'list' in where clause
is ambiguous"

I am stumped so I ask the list for help or advise please.

Any advise is very much appreciated and I thank you in advance for any help
or pointers.

Thank you

Dave C


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.672 / Virus Database: 434 - Release Date: 28/04/2004

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to