私はかなりPHPを使い慣れていませんが、私の問題です。SQLクエリから結果を取得しようとしていますが、何も返されません。PHPがMySQLクエリの結果を返す
<?php
$con = mysqli_connect("localhost","user","password","database");
if (mysqli_connect_errno()) {
echo "Connect failed: ". mysqli_connect_error();
}
$de= $con->real_escape_string($_GET["decode"]);
$sql = "select * from FG99_URL where short='".$de."'";
$result = mysqli_query($con, $sql);
while($row = mysqli_fetch_assoc($result)) {
echo "url: " . $row["url"]. " - fb_url: " . $row["fb_url"]."<br>";
$url=$row['url'];
$fb_url=$row['fb_url'];
$fb_type=$row['fb_type'];
$fb_title=$row['fb_title'];
$fb_description=$row['fb_description'];
$fb_image=$row['fb_image'];
$petpro=$row['petpro'];
echo $fb_url.'test 1</br>';
echo $row['fb_url'] . "test 2</br>";
print $fb_url."test 3</br>";
print $row['fb_url']."test 4</br>";
}
?>
<head>...
これは私が返され得るものです::
url: - fb_url:
test 1
test 2
test 3
test 4
すべてのヘルプはにappriciatedされるだろう。ここ
は、私は現在で働いていたコードです。
デバッグ行 –