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 ... 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 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` 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 ? Link to comment https://forums.phpfreaks.com/topic/78393-select-fast-question-help/#findComment-396702 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.