Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MySQL] Jak pobrać imie użytkownika
Kacper10
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 13.01.2013

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


Dzień dobry, mam następujący problem. Otóż mam taką strukturę tabeli:
  1. CREATE TABLE IF NOT EXISTS `tablica` (
  2. `id` int(10) NOT NULL,
  3. `uid` int(10) NOT NULL,
  4. `status` varchar(255) NOT NULL,
  5. PRIMARY KEY (`id`)
  6. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  7.  
  8. CREATE TABLE IF NOT EXISTS `users` (
  9. `user_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  10. `user_name` varchar(255) NOT NULL,
  11. `user_password` varchar(250) NOT NULL,
  12. `user_email` varchar(255) NOT NULL,
  13. `user_fname` varchar(255) NOT NULL DEFAULT '',
  14. `user_lname` varchar(255) NOT NULL DEFAULT '',
  15. `user_admin` int(11) NOT NULL,
  16. `user_regdate` int(11) NOT NULL,
  17. `user_from` varchar(255) NOT NULL,
  18. `user_website` varchar(255) NOT NULL,
  19. `user_gg` int(11) NOT NULL,
  20. `user_jabber` varchar(255) NOT NULL,
  21. `user_birth` date NOT NULL,
  22. `user_plec` int(11) NOT NULL,
  23. PRIMARY KEY (`user_id`)
  24. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

Oto problem:
Gdy piszę wpis, to chcę, żeby z ID autora wpisu pobierać imię i nazwisko, które podał przy rejestracji. Piszę, ponieważ nic nie znalazłem w Google.
Pozdrawiam.
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: 15.09.2025 - 08:46