|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Query columns
How do I query a column in a table that is in a database and then print out all the strings that are in that column of the table? I tried, and all it printed out was resource id#4.
|
|
#2
|
|||
|
|||
|
RE: Query columns
Probably you had some misrtake in syntax, trythis:
$conn=mysql_connect("localhost","username", "password"); mysql_select_db("your_db"); $res=mysql_query("Select column1 from my_table") or die(mysql_error()); if (mysql_num_rows($res)>0) { while ($result = mysql_fetch_array($res)) { echo $result['column1 ']."<br>"; } } |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Query columns |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|