Jump to content

"select" statement


AdrianR

Recommended Posts

hi guys.I have a little trouble with the select statement.
I mean I have a table named 1 and in the table I have 5 fields named "a""b""c""d""e".
How can I select the content of the field "a" but only if the content of field b is "test" and the content of field c is "more test"?
:( can`t find the answer..
SELECT a from dbname where b like 'test' and c like 'more test'
dosen`t seem to work
Link to comment
https://forums.phpfreaks.com/topic/4634-select-statement/
Share on other sites

[quote name='adrianR' date='Mar 10 2006, 09:16 PM' post='353726']
:( oh no,it dosen`t work.i was misstaking.the script dosen`t return any information
[/quote]


Try this
good luck

[code]
$sql = mysql_query("SELECT a
            FROM 1
            WHERE b='test' || c='more test'");

[/code]

or

[/quote]
[code]
$sql = mysql_query("SELECT a
            FROM 1
            WHERE b='test' && c='more test'");

[/code]
Link to comment
https://forums.phpfreaks.com/topic/4634-select-statement/#findComment-16235
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.