Posts: 1,832
Location: Somewhere else entirely
|
Just to clear some things up :
the @ signs supresses errors on function calls - so if the query fails you don't get a nasty error. This is usually a security measure since the standard SQL error is along the lines of 'mySQL error... blah blah version number blah blah ... using password: no blah blah....', containing info you don't want people to see so easily.
" double quotes " cause variables to expand out to their values, whereas ' single quotes ' ignores the variable and puts $varname straight into the string. When putting string values into mySQL however, you need to put single quotes around them:
PHP Code:
mysql_query("INSERT INTO table VALUES('$stuff')");
This is OK since the string as a whole is in double quotes, so the variable $stuff expands, and the single quotes are taken literally and included in the output.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Please login or register to view this content. Registration is FREE (aka MSN handwriting for forums)
|