Jump to content
MakeWebGames

Recommended Posts

Posted

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);
Posted

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);
Posted

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);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...