Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Statements


FlyingMonkey

Recommended Posts

Is there a way to force the database not to automatically increment.

 

I am using the following SQL statement:

 

//Add Default Tax Class

$query = mysql_query("

INSERT INTO tax_class (tax_class_id, tax_class_title, tax_class_description )

VALUES (0, 'Default Tax Setting' , 'Installed by Froogle Data Feeder')

")or print mysql_error();

 

//Add Default Tax Rates

$query = mysql_query("

INSERT INTO tax_rates (tax_rates_id, tax_class_id, tax_rate )

VALUES (0, 0, 0.000)

")or print mysql_error();

 

but the store automatically increments the id to next tax_class id instead of using "0" as defined.

 

any ideas?

Most likely your question has been answered, please do a search first.

Link to comment
Share on other sites

Is there a way to force the database not to automatically increment.

 

I am using the following SQL statement:

 

//Add Default Tax Class

$query = mysql_query("

INSERT INTO tax_class (tax_class_id, tax_class_title, tax_class_description  )

VALUES (0, 'Default Tax Setting' , 'Installed by Froogle Data Feeder')

")or print mysql_error();

 

//Add Default Tax Rates

$query = mysql_query("

INSERT INTO tax_rates (tax_rates_id, tax_class_id, tax_rate  )

VALUES (0, 0, 0.000)

")or print mysql_error();

 

but the store automatically increments the id to next tax_class id instead of using "0" as defined.

 

any ideas?

 

 

my guess is that field is set to auto-increment in the database?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...