Ciao
allora, io ho una tabella che vorrei creare cn questi comandi.
Questo perchè volevo che quando inserisco un nuovo record abbia di default le date che ho scelto (ovvero MA_BanForum il giorno prima, MA_Soft tra una settimana, ecc...)codice:MA_BanForum DATETIME DEFAULT DATE_SUB(NOW(), INTERVAL 1 DAYS), MA_Soft DATETIME DEFAULT DATE_ADD(NOW(), INTERVAL 7 DAYS), MA_SemiSoft DATETIME DEFAULT DATE_ADD(NOW(), INTERVAL 14 DAYS), MA_Supporter DATETIME DEFAULT DATE_ADD(NOW(), INTERVAL 30 DAYS),
Però quando do il comando mi da questo errore
Come mai? Non posso mettere le funzioni nel default? Oppure sbaglio?codice:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATE_ SUB(NOW(), INTERVAL 1 DAYS), MA_Soft DATETIME DEFAULT DATE_ADD(NOW(), INTE' at line 24
Grazie!


Rispondi quotando