English 中文(简体)
遇到营地和jax搜索功能的麻烦
原标题:Having trouble with php and ajax search function

我对php/ajax/mysql仍然很新。 不管怎样,Im创建搜索功能,该功能正在适当退回Im所收集的数据。

In brief, I have a mysql database set up. A php website that has a search function. I m now trying to add a link to a mysql database search rather than just showing the results.

在我的搜寻中。 php,对应线正在做罚款,但笔款=没有退还任何款项。 我只是想像这种呼声,而是与我的Sql php记录的联系。 我失踪了一点简单吗?

//echo $query;
$result = mysqli_query($link, $query);
$string =   ;

if($result) {
    if(mysqli_affected_rows($link)!=0) {
        while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)) {
            echo  <p> <b> .$row[ title ]. </b>  .$row[ post_ID ]. </p> ;
            $string .= "<p><a href= set-detail.php?recordID=".$row->post_ID." >".$row->title."</a></p>";
        }
    } else {
        echo  No Results for :" .$_GET[ keyword ]. " ;
    }
问题回答

美元流是一种阵列,不是物体,你必须使用美元[标题]或我sqli_fetch_object()而不是我sqli_fetch_array()。

事实上,你已经在你回信中使用了正确的辛迪加,但并没有在打上美元。

当然,在某个地方需要定出数额......





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签