How can I call PHP, search a column in a MySql table and get the result - found?
By namd3r
@namd3r (395)
Canada
5 responses
@naturecode (47)
• India
30 Oct 08
It is better to read the book
which contain the php and mysql
there are lot of books out there
@cooldude8889 (2609)
• Singapore
18 Dec 06
You have to create a table in your database and replace the tablename with the name you call your table.And insert connection info.
@apalachee (490)
• Australia
13 Nov 06
$ms_sql="select * from `yourdbtable` where title like'%" . $_POST['keyword'] . "%' or summary like'%" . $_POST['keyword'] . "%' or body like'%" . $_POST['keyword'] . "%' order by rate desc";
$query_res=mysql_query($ms_sql);
$count=mysql_num_rows($query_res);
and the input tag in your form would be named "keyword"
@prodancatalin (23)
• Romania
17 Dec 06
$sql_anunt='select * from `classifieds` WHERE classifieds_title LIKE "%'.$searchtext.'%" or classifieds LIKE "%'.$searchtext.'%" order by classifieds_data desc';
$res_anunt=mysql_query($sql_anunt) or die(mysql_error());
while($rr=mysql_fetch_array($res_anunt)) {
#here you can display all the results thats match your criteria
}