Page 1 of 1

Query Errors

Posted: Wed Apr 05, 2006 4:16 pm
by mbshaf4
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Does anyone see anything wrong with this query??

Code: Select all

if(empty($errors))
	{

	require_once('connect.php');

	$query = "UPDATE gr SET title='$t' , format='$f', neg='$n', trade='$tr', price='$s' WHERE user_id= '{$_COOKIE[user_id]}' AND title=$tit";

                  
	$result = @mysql_query ($query);

                if($result){
                echo '<font color="#006600" size="+1">Success:</font>';
                echo '<br>';
	echo "Your game, <b>$t</b> has been registered for a price of &nbsp;&nbsp;<b>$ $s";
	}else{

	echo '<font color="red"><b>There was a problem with your entry</b></font>';

	}


	}


I keep getting the error print out that i formatted b/c the query is unsuccessful. Thanks for the help


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Apr 05, 2006 4:28 pm
by feyd
remove the @, add mysql_error() to your error output so you can see what MySQL is saying is wrong.

Posted: Wed Apr 05, 2006 4:37 pm
by mbshaf4
Thanks for the info. The sql_error told me that i had labeled a column wrong....Thanks Alot!