|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
Finding row by the phone number
I'm trying to extract and display some fields from a row in a MySQL database by entering the phone number into a form. Here is the code I'm using but getting "query fail".
<? include('dbconnect.php'); include('font_setting.htm'); $query = ("select * from tbl_members (phone) VALUES ('$phone')"); //$query = ("select * from tbl_members (phone) VALUES ('$phone')"); //$sql = "INSERT INTO tbl_members (phone) VALUES ('$phone')"; $result = mysql_query($query) or die("Query fail"); if (mysql_num_rows($result) == 0) { //echo "result = 0"; } else { echo "<CENTER>"; echo "<table border=1>"; while($row = mysql_fetch_array($result)) { //echo "<table><tr><td>"; //echo "<table border=1>"; echo "<tr><td> " . $row['name'] . "</td><td> " . $row['category'] . "</td><td> " . $row['business_name'] . "</td><td> " . $row['phone'] . "</td></tr>"; echo "</font>"; //echo "</table>"; } } echo "</table>"; echo "</font>"; ?> |
|
#2
|
||||
|
||||
|
RE: Finding row by the phone number
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Finding row by the phone number |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|