Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Mysql][PHP] Autouzupełnianie tabel
vbig
post
Post #1





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 9.06.2010

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


Witam!

Chciałbym się dowiedzieć w jaki sposób można wykonać coś, co automatycznie aktualizuje tabele. Tzn. chciałbym w np.2 tabelach zawsze mieć te same dane. Jak zrobić aby dane były uzupełniane?

Chodzi głównie o to, że próbuję stworzyć 2 strony w php-fusion ale żeby wystarczyło zarejestrować się na jednej (IMG:style_emoticons/default/tongue.gif)
Z góry dziękuję za pomoc!
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
vbig
post
Post #2





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 9.06.2010

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


Zmieniłem to:
  1. $result = dbquery("INSERT INTO ".DB_USERS." (user_name, user_password, user_admin_password, user_email, user_hide_email, user_avatar, user_posts, user_threads, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status".$db_fields.") VALUES('".$user_info['user_name']."', '".$user_info['user_password']."', '', '".$user_info['user_email']."', '".$user_info['user_hide_email']."', '', '0', '0', '".time()."', '0', '".USER_IP."', '', '', '101', '$user_status'".$db_values.")");
  2. $result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_code='".$_GET['activate']."'");


Na to:

  1. $result = dbquery("INSERT INTO ".DB_USERS." (user_name, user_password, user_admin_password, user_email, user_hide_email, user_avatar, user_posts, user_threads, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status".$db_fields.") VALUES('".$user_info['user_name']."', '".$user_info['user_password']."', '', '".$user_info['user_email']."', '".$user_info['user_hide_email']."', '', '0', '0', '".time()."', '0', '".USER_IP."', '', '', '101', '$user_status'".$db_values.")");
  2. $result = dbquery("INSERT INTO PREFIX_USERS (user_name, user_password, user_admin_password, user_email, user_hide_email, user_avatar, user_posts, user_threads, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status".$db_fields.") VALUES('".$user_info['user_name']."', '".$user_info['user_password']."', '', '".$user_info['user_email']."', '".$user_info['user_hide_email']."', '', '0', '0', '".time()."', '0', '".USER_IP."', '', '', '101', '$user_status'".$db_values.")");
  3. $result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_code='".$_GET['activate']."'");
  4. $result = dbquery("DELETE FROM PREFIX_NEW_USERS WHERE user_code='".$_GET['activate']."'");


i niestety do tabeli PREFIX_USERS nic się nie dodaje.
Jakieś pomysły? (Przepraszam, że tak długo ale miałem pewne problemy techniczne z serwerem)
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: 25.09.2025 - 20:56