newbtophp Posted September 14, 2009 Share Posted September 14, 2009 Im going mad!!!!! I have a table called "site_bans" which contains another table called "ip" how would i do a from? Heres what i've been trying (but no luck) $sql="select Rows,ip from site_bans ( ip ) order by Rows"; Help! Quote Link to comment https://forums.phpfreaks.com/topic/174260-solved-i-cant-locate-the-table-help/ Share on other sites More sharing options...
Rommeo Posted September 15, 2009 Share Posted September 15, 2009 $sql="select Rows,ip from site_bans ( ip ) order by Rows"; try ; $sql="select Rows,ip from site_bans order by Rows"; what do you expect with " ( ip ) " there ? or do you want to ; $sql="select Rows,ip from site_bans where ip =$ip order by Rows"; Quote Link to comment https://forums.phpfreaks.com/topic/174260-solved-i-cant-locate-the-table-help/#findComment-918610 Share on other sites More sharing options...
newbtophp Posted September 15, 2009 Author Share Posted September 15, 2009 ( ip ) is... Im trying to select the columns Rows and ip which are located within the ip table which is a subtable of site_bans So when i go to phpmyadmin i have to click site_bans then click a table called ip then it displays 2 columns Rows and ip. Quote Link to comment https://forums.phpfreaks.com/topic/174260-solved-i-cant-locate-the-table-help/#findComment-918611 Share on other sites More sharing options...
MatthewJ Posted September 15, 2009 Share Posted September 15, 2009 It sounds like site_bans is the name of your database and ip is the name of the table that stores the banned ip's how about "SELECT * FROM ip ORDER BY Rows ASC" Quote Link to comment https://forums.phpfreaks.com/topic/174260-solved-i-cant-locate-the-table-help/#findComment-918612 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.