asmith Posted November 22, 2007 Share Posted November 22, 2007 in sql we have : i.e. select * from table_name order by field_name DESC what it would be for tables in database ? i have : table1 username e-mail date abc cvb dfg table2 username e-mail date whr der ewe table3 username e-mail date abc ewe jff how can i select these tables from a database ORDER by date or username ... Quote Link to comment https://forums.phpfreaks.com/topic/78393-select-fast-question-help/ Share on other sites More sharing options...
runnerjp Posted November 22, 2007 Share Posted November 22, 2007 ok im new to this stuff so could be worng but i belive you have to do something like $list.=.["username"] then just echo($list) like i said new to this but i think thats correct Quote Link to comment https://forums.phpfreaks.com/topic/78393-select-fast-question-help/#findComment-396690 Share on other sites More sharing options...
rajivgonsalves Posted November 22, 2007 Share Posted November 22, 2007 should be something like this, you'll have to use union select `username`,`e-mail`,`date` from table1 UNION select `username`,`e-mail`,`date` from table2 UNION select `username`,`e-mail`,`date` from table3 ORDER BY `username` Quote Link to comment https://forums.phpfreaks.com/topic/78393-select-fast-question-help/#findComment-396693 Share on other sites More sharing options...
asmith Posted November 22, 2007 Author Share Posted November 22, 2007 searching tables instead of searching rows of a table , takes so much time ? or the diffrence is not senseble ? Quote Link to comment https://forums.phpfreaks.com/topic/78393-select-fast-question-help/#findComment-396702 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.