?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Specific Row
Author:??(---.prem.tmns.net.au)
Date:???03-20-03 03:48

Ok, im only a beginner at php.. i admit
i started looking at it 2 days ago, so give me a lil cred ey.
This may seem like an easy question..

Its regarding MySQL database quieries.
I want to be able to refer to a column and take that rows corresponding information from another column.
Example:
ID | Integer | Word
--------------------
0 | 0 | zero
1 | 1 | one
2 | 2 | two
3 | 3 | three
i want to search for a number as 'Integer', and return a string from the corresponding row in the 'Word' field.
So that
Input = 1
Output = One

i thought i could do this by
$result = @mysql_query("SELECT Word FROM table WHERE integer=1");
but that does not work.. (for me anyways)
any help would be much appreciated.
the sooner, the better
Thankyou for your time
Michael

?Topics Author? Date
?Specific Row??new
MiK 03-20-03 03:48?
?Re: Specific Row??new
martin 03-20-03 04:58?
?Re: Specific Row??new
bastien 03-20-03 06:30?
?Re: Specific Row??new
chetan 03-21-03 04:56?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > Ok, im only a beginner at php.. i admit > i started looking at it 2 days ago, so give me a lil cred ey. > This may seem like an easy question.. > > Its regarding MySQL database quieries. > I want to be able to refer to a column and take that rows > corresponding information from another column. > Example: > ID | Integer | Word > -------------------- > 0 | 0 | zero > 1 | 1 | one > 2 | 2 | two > 3 | 3 | three > i want to search for a number as 'Integer', and return a > string from the corresponding row in the 'Word' field. > So that > Input = 1 > Output = One > > i thought i could do this by > $result = @mysql_query("SELECT Word FROM table WHERE > integer=1"); > but that does not work.. (for me anyways) > any help would be much appreciated. > the sooner, the better > Thankyou for your time > Michael ">??

Provided By
Phorum