Jump to content

[SOLVED] T_CONSTANT_ENCAPSED_STRING - Help Please!


GraphiX

Recommended Posts

Hello all

 

Well, I am getting an error called "Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING" Please forgive me if this is something obvious but I can't see anything wrong with me code...

 


    if(!$action || !in_array($action,$actions_array)){
    $sql1 = "SELECT * FROM `forum_cats` WHERE `admin` < ".$row['admin']"+1";
    $res1 = mysql_query($sql1) or die(mysql_error());

 

Error line is the $sql1 variable.

 

Any thoughts?

 

GraphiX

You're missing the period (.) when going back into the string:

 

Yours:

$sql1 = "SELECT * FROM `forum_cats` WHERE `admin` < ".$row['admin']"+1";

 

Correct:

$sql1 = "SELECT * FROM `forum_cats` WHERE `admin` < " . $row['admin'] . "+1";

Archived

This topic is now archived and is closed to further replies.

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