function getfield($get){
global $connection;
$query = "SELECT id, username, firstname, lastname FROM users WHERE username='".$_SESSION['user_id']."'";
if ($query_r = mysqli_query($connection, $query)) {
$num_rows = ($query_r -> num_rows);
if ($mysqli_result = mysqli_result($query_r, 0, $get)) {
return $mysqli_result;
}
我做了一个登录表单,现在一切正常但这个功能没有显示数据。我认为mysql_result
在7.1中无效。
答案 0 :(得分:0)
{{1}}
答案 1 :(得分:0)
函数<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="dd" id="nestable" data-id="0">
<ol class="dd-list">
<li class="dd-item" data-id="1">
<div class="dd-handle">Sub-indicator 1</div>
<ol class="dd-list">
<li class="dd-item" data-id="2">
<div class="dd-handle">Sub-indicator 2</div>
<ol class="dd-list">
<li class="dd-item" data-id="3">
<div class="dd-handle">Sub-indicator 3</div>
<ol class="dd-list">
<li class="dd-item" data-id="4">
<div class="dd-handle">Sub-indicator 4</div>
</li>
</ol>
</li>
</ol>
</li>
<li class="dd-item" data-id="3">
<div class="dd-handle">Sub-indicator 3</div>
<ol class="dd-list">
<li class="dd-item" data-id="4">
<div class="dd-handle">Sub-indicator 4</div>
</li>
</ol>
</li>
</ol>
</li>
</ol>
</div>
不存在,因此您需要使用mysqli_result
之类的内容。用这个替换你最里面的mysqli_fetch_array()
- 子句:
if