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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.