嗨,我有这个有效的代码
function onCameraClick() {
var base64Val = kony.convertToBase64(frmImageSize.camCamera.rawBytes);
var imageSizeinKB = base64Val.length*0.75 )/1024;
}
但我想使用预备语句,但我无法弄清楚如何使用 $sql = "SELECT * FROM rock_news ORDER BY id DESC LIMIT 3";
$result = $dbCon->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_object()) {
$id = $row->id;
$heading = utf8_encode($row->heading);
$subheading = utf8_encode($row->subheading);
$description = utf8_encode($row->description);
$created = $row->created;
$author = utf8_encode($row->author);
?>
<div class="news-wrapper flex">
<div class="col10">
<div class="id-wrapper">
<p class="news-id"><?php echo $id?></p>
<div class="arrow-left"></div>
</div>
</div>
<div class="col90 news-info-wrapper flex-d-c">
<div class="news-publisher-wrapper flex space-b">
<h2 class="center tekst2"><?php echo $author?></h2>
<h2 class="tekst2"><?php echo $created?></h2>
</div>
<p class="news-publisher-wrapper-text flex1"><?php echo $heading ?></p>
<div class="news-more flex center-r">
<a class="center" href="index.php?page=newsTest&id=<?php echo $id ?>">Læs mere</a>
</div>
</div>
</div>
<?php
}
}
$dbCon->close();
?>
。我用SELECT
制作了它,但这有点不同?
这是我到目前为止所做的,我不确定INSERT
发生了什么。我不确定while循环如何在这里工作,或者我应该在$meta = ?
,$value
等中放置哪些参数?谁能向我解释这是如何工作的?它来自这个Stack Overflow线程。回答是44次:SELECT * FROM in MySQLi
$value2