News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Difference between order_id and order_number

Started by jaguar, June 29, 2006, 14:34:14 PM

Previous topic - Next topic

jaguar

What is the difference between order_id and order_number?

If the order_id is the unique identifier, what is the order_number for?

Pablo

Soeren

The order_id is the auto_increment field in the table "jos_vm_orders" that counts from 1 to xxxx. It identifies the order.

The order_number identifies the order as well, but it is a random md5 hash. That allows you to display a link to an order without an easy-to-guess ID.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

chirng

so, how to create a random md5 hash?

Please let me know asap, TQ.

Al chirng

ViperFish

I'm trying to read values from an Oscommerce orders table and insert them into a VM table. But, how do I create the order_number with SQL?
http://viperfish.com.au <--- New website and portfolio online now.

Soeren

Hi,

use the MySQL function MD5.

http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html#function_md5

Just use some random values like the order time and ID to create different random md5 hashs.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net