Jump to content

Recommended Posts

$result = mysql_query("SELECT * FROM Leads WHERE CID='" . $session->username . "' AND LeadID='echo $_GET['leadid']';" );

 

 

It is giving me an error saying

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

 

Please help!!!

hmm... next time.. create like this

<?php
$sql="SELECT * FROM Leads WHERE CID='". $session->username . "' AND LeadID='". $_GET['leadid']. "';";
$result = mysql_query($sql );


?>

hmmm.. strange echo inside?

 

You wanna get rid of that extra semi-colon as well ;)

nah.. i just remove that echo

about the semicolon..

i'm not remove because he/she might not type 1 query but more.. and the semicolon are needed

 

Are you sure??

 

The query is executed on the next line!

 

The semicolon is OK, but not needed in this case. There are better ways (IMO) of running multiple queries, but this is getting offtopic.

I understand the syntax for running multiple queries. What I was saying, is seeing that the query is exectued on the line after it is defined it obviously isn't being used for a multiple query so that semi-colon is pointless. Unless he was thinking of re-using that same query and 'sticking' another one afterwards which would just be a bizare process.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.