Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> INSERT INTO
panbobek44
post 29.03.2006, 11:28:48
Post #1





Grupa: Zarejestrowani
Postów: 58
Pomógł: 0
Dołączył: 16.12.2005

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


  1. <?php
  2. $db=@mysql_connect('localhost', '***', '***');
  3. if(!$db) die("Brak połączenia z bazą danych");
  4. else
  5. {
  6. @mysql_query("set names latin2");
  7. @mysql_select_db('***');
  8. }
  9. mysql_query("INSERT INTO users VALUES ($users_id, $users_haslo, $users_nazwa, $users_mail, $users_mail, $users_adr
    es, $users_www)"
    );
  10. ?>


  1. CREATE TABLE `users` (
  2. `users_id` varchar(50) NOT NULL DEFAULT '0',
  3. `users_haslo` varchar(50) NOT NULL DEFAULT '',
  4. `users_nazwa` varchar(50) DEFAULT NULL,
  5. `users_mail` varchar(50) NOT NULL DEFAULT '',
  6. `users_adres` varchar(100) DEFAULT NULL,
  7. `users_www` varchar(100) DEFAULT NULL,
  8. PRIMARY KEY (`users_id`)
  9. ) ENGINE=MyISAM DEFAULT CHARSET=latin2;


Dlaczego nic nie jest dodawane do bazy?
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 05:36