OK, I'm stumped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's my dilemma:

2 tables and 2 others that have current data in them.

The 2 tables that have the current data in them I know how to display,
the problem I am having is the 2 tables I need to transfer information
to have to have the same key in one location

Tables:
CREATE TABLE `store_orders` (
  `id` int(11) NOT NULL auto_increment,
  `order_date` datetime default NULL,
  `order_name` varchar(100) default NULL,
  `order_address` varchar(255) default NULL,
  `order_city` varchar(50) default NULL,
  `order_state` char(2) default NULL,
  `order_zip` varchar(10) default NULL,
  `order_tel` varchar(25) default NULL,
  `order_email` varchar(100) default NULL,
  `item_total` float(6,2) default NULL,
  `shipping_total` float(6,2) default NULL,
  `authorization` varchar(50) default NULL,
  `status` enum('proceed','pending') default NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


--
-- Table structure for table `store_orders_itemmap`
--

CREATE TABLE `store_orders_itemmap` (
  `id` int(11) NOT NULL auto_increment,
  `order_id` int(11) default NULL,
  `sel_item_id` int(11) default NULL,
  `sel_item_qty` smallint(6) default NULL,
  `sel_item_price` float(6,2) default NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


The 'id' of the 'store_orders' table HAS to be entered into 'order_id'
of the 'store_order_itemmap'.  I am having the problem because I can't
figure out how to logically make that happen in 1 step, moving
everything from the 2 tables they are currently in (a temp table of the
customer information a temp table of the order'.  I use the session ID
to track the temporary stuff, but once they commit it to an order I need
a different number.  They are allowed to make multiple orders on the
session ID and changing a session ID is not working for me (destroy and
start on the session do nothing).

HELP!

TIA!!

Robert

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Genius does what it must, and talent does what it can.

-Owen Meredith. 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux