title: How to generate Unique Order Id (just to show touser) with actual Order Id?
body: <p><strong>EDIT AGAIN : I don't want to create another question, so asking here. I have the same situation. But this time I need the algo in C language. Can any body help me.</strong></p>
  
  <p>I have following table.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `j741_order` (
    `order_id` int(11) NOT NULL AUTO_INCREMENT,
    `buyer_id` int(11) NOT NULL,
    `subtotal` decimal(15,5) DEFAULT '0.00000',
    `discount` decimal(15,5) NOT NULL DEFAULT '0.00000',
    `shipping` decimal(15,5) DEFAULT '0.00000',
    `tax` decimal(15,5) DEFAULT '0.00000',
    `total` decimal(15,5) NOT NULL DEFAULT '0.00000',
    `currency` char(3) DEFAULT NULL,
    `status` int(11) NOT NULL DEFAULT '0',
    `created_date` datetime NOT NULL,
    `modified_date` datetime NOT NULL,
    PRIMARY KEY (`order_id`),
    KEY `idx_buyer_id` (`buyer_id`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  </code></pre>
  
  <p>I want to generate a unique Order Id, (just to show to user) so that user can not guess what will be the next Order Id.</p>
  
  <blockquote>
    <p>How can I get that Unique Random Order
    Id from original Order If</p>
    
    <p>and get back original order Id from
    that Random Order Id?</p>
  </blockquote>
  
  <p>EDIT : <strong>I don't want to create any other field.</strong></p>