Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> klopot z zapytaniem mysql
acztery
post
Post #1





Grupa: Zarejestrowani
Postów: 945
Pomógł: 7
Dołączył: 15.03.2005
Skąd: katowice

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


witam,

ciekawi mnie cos takiego

chce wydobyc z tabeli takie dane Login,UserID,Lang,Fname,Lname

chce zeby zapytanie zwrocilo mi w

1 polu Login i UserID ( pole mialo by nazwe dane )
a reszta jak leci..

probowalem tak ale nic

  1. SELECT (Login ,UserID )AS dane, Fname,Lname
  2. FROM `sys_users`
  3. WHERE 10


sa jakies pomysly
Go to the top of the page
+Quote Post
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Cytat
sa jakies pomysly
tak, jak zwykle manual
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
i funkcje laczace pola
Go to the top of the page
+Quote Post
Dafidov
post
Post #3





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 6.07.2005
Skąd: Śląsk Bytom

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


Odpowiedz (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

  1. SELECT concat(Login, ' - ', UserID) AS dane, Lang, Fname, Lname
  2. FROM `sys_users`
  3. WHERE id = '10';

Powinno zadziałać (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
jak by nie zadzialalo to sprobuj bez ' (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

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 - 23:42