Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL] Problem z zapisem do bazy danych, Problem z INSERTem
Tomplus
post
Post #1





Grupa: Zarejestrowani
Postów: 1 879
Pomógł: 230
Dołączył: 20.03.2005
Skąd: Będzin

Ostrzeżenie: (0%)
-----


Witam,
Mam problemik i nie wiem jak go rozwiązać.

mam zapytanie z PHP
  1. <?php
  2. $pytaj = zapytaj("INSERT INTO `ski_users` (`user`, `haslo`, `email`, `register`, `reg_code`)
  3. VALUES (Tom, 2dec995c, tomplus@gmail.com, 2008-02-10 20:44:19, 83sdsds16fdf5);");
  4. ?>


I nie wiem co jest źle, bo wpis nie powoduje zapisu do bazy.
Struktura wygląda tak
id int(12) No auto_increment
user varchar(16) No
haslo varchar(128) No
email varchar(64) No
register datetime Yes NULL
reg_code varchar(16) Yes NULL

i błąd jaki mi wywala to:
  1. SQL query:
  2.  
  3. INSERT INTO `ski_users` ( `user` , `haslo` , `email` , `register` , `reg_code` )
  4. VALUES (
  5. Tom, 2dec995c, tomplus@gmail.com , 2008 -02 -1020 :44 :19, 83sdsds16fdf5
  6. )
  7.  
  8. MySQL said: Documentation
  9. #1064 - 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 '@gmail.com, 2008-02-10 20:44:19, 83sdsds16fdf5)' at line 2
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 16:01