Jump to content

Recommended Posts

I know when using PHP the system does not let you use " in the code unless in certain places. I have check the code where it says there is an error but it still says there is an error. Does anyone know if there is another type of error for T_STRING? I have only discovered the " T_STRING error so far. Here is what the error is and 3 lines of the code:

 

<--The error-->

Parse error: syntax error, unexpected T_STRING in XXmypageXX.php on line 14

<--The line and lines under and above-->

		$run[$cronName] = 1;
	mysql_query("UPDATE ghetto_cron SET last_run = '$today2' WHERE game = '$game' AND id = '$getMonthlyCron[id]'");
	mysql_query(UPDATE ghetto_cron SET total_runs = total_runs + 1 WHERE game = $game AND id = $getMonthlyCron[id]);

Link to comment
https://forums.phpfreaks.com/topic/112064-t_string-error-can-not-find-the-error/
Share on other sites

Oh and maybe by learning how to fix these errors it may fix the others. (It seemed to do that with other errors, some would be fixed because a higher one was fixed)

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/kentucom/public_html/index.php on line 12

remove the single quotes

 

while ($getUpdates = mysql_fetch_array($findUpdates)) {

 

putting single quotes around that causes you to assign a literally interpreted string to $getUpdates, and as long as php successfully assigns it (which there's really no way it won't fail to assign it unless some meteor crashes into the server or something), your loop will always be true and you'll have an infinite loop.

okay well I really have no idea what you're talking about because every time you post you have some new piece of code and it seems like you're on an entirely different issue... but anyways, the difference between = and == is that = is an assignment operator, as in you want to assign something to a variable.  == is a condition operator, as in, you want to compare two things.

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.