Jump to content
MakeWebGames

Recommended Posts

Posted

Ok im a bit of a newb at coding. I got an error with one of my mods after I converted it from v1 to v2 and i get this error and cant figure our what it is.

Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/*******/public_html/mod.php on line 18

Line 18 is

$q=$db->("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}",$c);

 

If somone can help or at least try to help it would be much apprciated!

Posted

Re: Can Somone Help? Im A Bit Of A Newb.

alright fixed that problem but now i got this one

QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Query was SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=

Posted

Re: Can Somone Help? Im A Bit Of A Newb.

Just use this...

 

Change your query

$q=$db->("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}",$c);

to this

$q = $db->query("SELECT u.*, us.* FROM users u LEFT JOIN userstats us ON u.userid = us.userid WHERE u.userid = {$_GET['ID']}");

 

That should work.

or you could try this..

$lol = $_GET['ID'];

$q = $db->query("SELECT u.*, us.* FROM users u LEFT JOIN userstats us ON u.userid = us.userid WHERE u.userid = $lol");

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...