php - What is wrong with my SQL syntax here? -


I am trying to create an IT property database with a web front end.

I

For the first time I tried to enter data in the database.

Here is the code:

   

The error I get is: There is an error in your SQL syntax;

< P> This data is just test data, use '', '678', 'server', '789' near I, check the manual related to your messaging server version for the correct syntax. It was trying, but it looks at $ values, $ type, $ notes.

If they help, then this table statement can be found. Relationships:

  & lt ;? Connect to php // mysql server and database "asset_db" mysql_connect ("localhost", "asset_db", "asset_db") or die (mysql_error ()); Mysql_select_db ("asset_db") or die (mysql_error ()); // Property table mysql_query ("Make TABIL property (id VARCHAR (50) primary key, company VARCHAR (50), location VARCHAR (50), purchase_date VARCHAR (50), purchase_start VARCHAR (50), value VARCHAR (50) type VARCHAR (50), notes "Varchar (200)" or "Mysql_query" (create mysql_error ()); echo created property table.   ID VARCHAR (50) Primary key, software VARCHAR (50), license VARCHAR (50)) "or die (mysql_error ()); echo" software table created. & Lt; / br / & gt; "; (50) ACC VARCHAR (50), User Varchar (50), model VARARAR (50), model VARCHAR (50), model VARCHAR (50), table table of mysql_query ("Create Table Laptop (ID VARCHAR (50) Primary Key, Manufacturer VARCHAR (50) Prev_user VARCHAR 50), warranty VARCHAR (50) "or die (mysql_error ()); echo" created the laptop table.    

Running standard LAMP stack on Ubuntu 10.04.

Thanks.

If you are missing an initial bid, the bottom right section is:

  mysql_query ("property, id, company, location, purchase_date, purchase_order, value INSERT VALUES ('$ id', '$ company', '$ location', '$ purchase _date ',' $ buy_order ',' $ value ',' $ type ',' $ notes')) or dying (mysql_error ()); resonance "property added";  

Comments