Karlos Posted January 4, 2009 Posted January 4, 2009 Well...the basic v2 globals.php have a query for jobs..and I'm trying to get only what is needed and I have done the SQL but now I get the error on the v2 header saying: Your account may be broken. Please mail help@localhost stating your username and player ID. can anyone help to try and help me to get this to work. i currecntly have : $JobQuery = sprintf( "SELECT u.userid, u.job, u.jobrank, us.userid, us.strength, us.labour, us.IQ, j.jID, jr.jrID " . "FROM users u " . "LEFT JOIN userstats us " . "ON u.userid=us.userid " . "LEFT JOIN jobs j " . "ON j.jID=u.job " . "LEFT JOIN jobranks jr " . "ON jr.jrID=u.jobrank " . "WHERE u.userid=('%u')", $userid); $is = $db->query($JobQuery); Quote
Haunted Dawg Posted January 4, 2009 Posted January 4, 2009 Re: Query Problem... When it say's that your account may be broken you need the user's email. Your header is calling out for a email every page load. So just add to your query: u.email, Quote
Karlos Posted January 4, 2009 Author Posted January 4, 2009 Re: Query Problem... Thanks. Killah put me on the right direction but there is more I needed to add, but my final result that worked and all I needed was: $JobQuery = sprintf( "SELECT u.userid, u.username, u.money, u.crystals, u.level, u.job, u.jobrank, u.email, u.energy, u.brave, u.will, u.hp, u.maxenergy, u.maxbrave, u.maxwill, u.maxhp, us.userid, us.strength, us.labour, us.IQ, j.jID, jr.jrID " . "FROM users u " . "LEFT JOIN userstats us " . "ON u.userid=us.userid " . "LEFT JOIN jobs j " . "ON j.jID=u.job " . "LEFT JOIN jobranks jr " . "ON jr.jrID=u.jobrank " . "WHERE u.userid=('%u')", $userid); $is = $db->query($JobQuery); Quote
Karlos Posted January 5, 2009 Author Posted January 5, 2009 Re: Query Problem... [Fixed] In the end I found more problems and I have almost certainly got everything I need now. If anyone can see if i need more can they please mention it to me please. $JobQuery = sprintf( "SELECT u.userid, u.username, u.level, u.money, u.crystals, u.laston, u.lastip, u.energy, u.will, u.maxwill, u.brave, u.maxbrave, u.maxenergy, u.hp, u.maxhp, u.hospital, u.jail, u.jail_reason, u.fedjail, u.user_level, u.gender, u.gang, u.donatordays, u.email, u.hospreason, us.userid, us.strength, us.labour, us.IQ, j.jID, jr.jrID " . "FROM users u " . "LEFT JOIN userstats us " . "ON u.userid =us.userid " . "LEFT JOIN jobs j " . "ON j.jID = u.job " . "LEFT JOIN jobranks jr " . "ON jr.jrID = u.jobrank " . "WHERE u.userid = ('%u')", $userid); $is = $db->query($JobQuery); 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.