开发者

How do I capture search index in MySQL using PHP?

开发者 https://www.devze.com 2023-02-08 00:13 出处:网络
I do have table table1 with two columns say name and details when I search by details there were multiple name listing. I want to retrieve that name lis开发者_开发百科t and display to a webpage using

I do have table table1 with two columns say name and details when I search by details there were multiple name listing. I want to retrieve that name lis开发者_开发百科t and display to a webpage using PHP. how can I do that?


the most basic page.php:

<?php
$sql = mysql_query('SELECT name FROM table1 WHERE details = "something"');
$result = array();
while($row = mysql_fetch_assoc($sql)){
  array_push($result,$row['name']);
  echo $row['name'].'<br />';
}
print_r($result);
0

精彩评论

暂无评论...
验证码 换一张
取 消