Moin Zusammen,
folgende Tabelle macht mir auf meinem localhost keine Proleme.
Allerdings wenn wir dies online stellen wollen, gibts Ärger:
a) mit der Überschrift( CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP)
b) das collate muss ich auch rausnehmen
PHP-Code:
CREATE TABLE `orders` (
`ord_id` int(11) unsigned NOT NULL auto_increment,
`ord_number` varchar(32) collate latin1_general_ci NOT NULL default '0',
`ord_cust_id` int(11) NOT NULL default '0',
`ord_prod_id` int(11) NOT NULL default '0',
`ord_date` datetime NOT NULL default '0000-00-00 00:00:00',
`ord_pay_adr_id` int(11) NOT NULL default '0',
`ord_deliv_adr_id` int(11) NOT NULL default '0',
`ord_pay_id` int(11) NOT NULL default '0',
`ord_sz00` int(11) NOT NULL default '0',
`ord_sz01` int(11) NOT NULL default '0',
`ord_sz02` int(11) NOT NULL default '0',
`ord_sz03` int(11) NOT NULL default '0',
`ord_sz04` int(11) NOT NULL default '0',
`ord_sz05` int(11) NOT NULL default '0',
`ord_sz06` int(11) NOT NULL default '0',
`ord_sz07` int(11) NOT NULL default '0',
`ord_sz08` int(11) NOT NULL default '0',
`ord_sz09` int(11) NOT NULL default '0',
`ord_sz10` int(11) NOT NULL default '0',
`ord_sz11` int(11) NOT NULL default '0',
`ord_sz12` int(11) NOT NULL default '0',
`ord_sz13` int(11) NOT NULL default '0',
`ord_sz14` int(11) NOT NULL default '0',
`ord_unit_price` decimal(10,2) NOT NULL default '0.00',
`ord_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`ord_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
Insbesondere die Geschichte mit dem Timestanp ist ärgerlich. Wie bringe ich mysql dazu das aktuelle Datum dort einzutragen.
Jetzt wollt Ihr wahrscheinlich auch noch wissen, welche mysql-Versionen das betrifft: Also auf dem Localhost->4.17,
auf dem Server->meine ich 4.07
MfG
derTrallala