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
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:
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:
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
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
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
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
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
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
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
10 matches
Mail list logo