这个简单的数据库查询代码有什么问题? [英] What is wrong with this simple database query code?

查看:74
本文介绍了这个简单的数据库查询代码有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




出于某种原因,在以下代码中$ result始终为空。但如果我直接在数据库上重新查询(在phpmyadmin中),它会返回一个值。


谁能告诉我我错过了什么?

Hi,

for some reason, in the following code $result is always empty. yet if I reun the query directly on the database (in phpmyadmin) it returns a value.

can anyone tell me what I''m missing?

展开 | 选择 | Wrap | 行号

推荐答案

结果始终为空。但如果我直接在数据库上重新查询(在phpmyadmin中),它会返回一个值。


谁能告诉我我错过了什么?

result is always empty. yet if I reun the query directly on the database (in phpmyadmin) it returns a value.

can anyone tell me what I''m missing?

展开 | 选择 | Wrap | 行号


你在execute()之前得到了bind_result()。


查看手册了解更多信息:
http://www.php.net/manual/en/mysqli-stmt.prepare.php


干杯,


Dan
You''ve got your bind_result() before the execute().

Check out the manual for more info:
http://www.php.net/manual/en/mysqli-stmt.prepare.php

Cheers,


Dan


oops,这是我的一个错误,我移动它,看它是否会成为任何一个差价。


即使是正确的方法也行不通,
oops, that was an error on my part, I moved it around to see if it would make any difference.

even the correct way doesn''t work,


这篇关于这个简单的数据库查询代码有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆