jbille Posted October 12, 2006 Share Posted October 12, 2006 I'm not sure if this is the correct forum to ask this but I'm going to anyway. I have a php program which needs to select * from every table where number = '$number' in the entire database and return what table it matches the $number. The only thing I can think of is a bunch of if statements. If anyone could give me some advice about what to do I would greatly appreciate it. Thanks. Quote Link to comment Share on other sites More sharing options...
trq Posted October 12, 2006 Share Posted October 12, 2006 The question is why? Your database design sounds like it is foobar if this really is the solution you seek. Quote Link to comment Share on other sites More sharing options...
jbille Posted October 12, 2006 Author Share Posted October 12, 2006 I would use sub-tables, however I would need to have 5 columns in every sub-table. Do you have any other suggestions. Quote Link to comment Share on other sites More sharing options...
btherl Posted October 12, 2006 Share Posted October 12, 2006 You could make an array of all the tables you want to check and use a for loop.. is that the kind of solution you're looking for? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.