Tomo Posted December 21, 2006 Posted December 21, 2006 I'm trying to set up a 'Location:' thing up on the main page but I can't get the right code for the cityname, I'm using {$r['cityname']} but it's not working. Shouldn't it be {$ir['cityname']} ? That doesn't work either, lol. :( Quote
UCC Posted December 21, 2006 Posted December 21, 2006 Re: Silly question... Well where did you define $r? $ir['location'] should give you a number not a name. That number needs translated. Quote
Tomo Posted December 21, 2006 Author Posted December 21, 2006 Re: Silly question... I got {$r['cityname']} from viewuser.php, I assumed it would work elsewhere, I'm still new to PHP, sorry. Quote
Tomo Posted December 23, 2006 Author Posted December 23, 2006 Re: Silly question... Any help? :| Quote
seanybob Posted December 23, 2006 Posted December 23, 2006 Re: Silly question... im just pulling this from viewuser, u could tear stuff out to make it more efficient $q=mysql_query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}",$c); $r=mysql_fetch_array($q); print"{$r['cityname']}"; Quote
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.