Re: [PHP-DB] SQL question!

2004-05-03 Thread Larry E . Ullman
I have these tables. Users ( id,name,etc ) Coments : ( id , comment ) How do I do this kind of query: I thought in one thing like this but I cant figure it out. Example: Select * from users order by id desc in (select count (id) from comments) Expected result: List of users: * User1 See

[PHP-DB] SQL question!

2004-05-03 Thread Bruno Braga
Hey. I have these tables. Users ( id,name,etc ) Coments : ( id , comment ) How do I do this kind of query: I thought in one thing like this but I cant figure it out. Example: Select * from users order by id desc in (select count (id) from comments) Expected result:

[PHP-DB] SQL question

2003-12-11 Thread Constantin Brinzoi
I know it is possible to search a database like this: SELECT * FROM x_table WHERE name=%part_of_name% but I don't know for sure the correct command. Could you tell me the right syntax? TIA Aurel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] SQL question

2003-12-11 Thread Muhammed Mamedov
It should be as follows: SELECT * FROM x_table WHERE name Like = %part_of_name% Hope this helps, M.Mamedov - Original Message - From: Constantin Brinzoi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 1:51 PM Subject: [PHP-DB] SQL question I know

RE: [PHP-DB] SQL question

2003-12-11 Thread brettking
try SELECT * FROM x_table WHERE name LIKE %part_of_name% -Original Message- From: Constantin Brinzoi [mailto:[EMAIL PROTECTED] Sent: 11 December 2003 11:52 To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL question I know it is possible to search a database like this: SELECT

Re: [PHP-DB] SQL question

2003-12-11 Thread Muhammed Mamedov
M.Mamedov - Original Message - From: Muhammed Mamedov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 2:00 PM Subject: Re: [PHP-DB] SQL question It should be as follows: SELECT * FROM x_table WHERE name Like = %part_of_name% Hope this helps, M.Mamedov

[PHP-DB] SQL question!

2002-06-27 Thread Bruno Gimenes Pereti
Hi, I need a sql query to join multiple lines into only one line. Ok, I wouldn´t understand this question so I´ll give an example (I´m doing it on mysql but I need it to mssql). Supose I have 3 tables: mysql select * from test1; ++---+ | id| nome | ++---+ | 1| Bruno

[PHP-DB] SQL Question

2002-03-13 Thread Kevin Diffily
Hello, I have a simple SQL Question. I would like to take the column city in database addresses and find out which cities are available in it. In other words if the following values are in there: city El Paso Burlington New York New York El Paso Burlington I would like it to return El Paso

RE: [PHP-DB] SQL Question

2002-03-13 Thread Rick Emery
SELECT DISTINCT city FROM addresses; -Original Message- From: Kevin Diffily [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 1:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL Question Hello, I have a simple SQL Question. I would like to take the column city in database

RE: [PHP-DB] SQL Question

2002-03-13 Thread Gurhan Ozen
you can do it by using distinct function .. Do: SELECT DISTINCT(city) FROM addresses; Gurhan -Original Message- From: Kevin Diffily [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 2:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL Question Hello, I have a simple SQL