INSERT INTO

anyone know why this does not work?

[php]mysql_query(“INSERT INTO machine (EquipFile ID) VALUES (’”.$equipnum."’)");[/php]

Let this be a simple lesson. You cannot have spaces in mysql column heading while using this function.

Why not enclose the column name in backticks?

[php]mysql_query(“INSERT INTO machine (EquipFile ID) VALUES (’”.$equipnum."’)");[/php]

Using spaces in column names is generally a bad idea, but this may be a suitable workaround.

Exactly what is the difference between machine and machine? What do the back quotation things do exactly? The use of them seems to never be consistant. It seems sometimes you need them and sometimes you dont.

Sponsor our Newsletter | Privacy Policy | Terms of Service