mltple表查询错误:查询为空 [英] mltple table query Error: Query was empty

查看:83
本文介绍了mltple表查询错误:查询为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在使用select语句来检索数据,我知道(数据存在)在MySQL数据库中。

这是我正在研究的部分:

展开 | 选择 | Wrap | 行号

解决方案

嘿。


您确定已经在该页面上启动了会话(使用 session_start )?

在任何情况下,您都应该在尝试将ID放入查询之前验证该ID。您可以在

上使用 isset 功能blockquote> _SESSION [''sesRecipeID''] 这样做的元素。


它也没告诉我是什么值

sqlString是



您正在打印错误的变量。你的echo正在打印mysql_query调用的结果,而不是查询字符串,它永远不会打印除FALSE或资源ID之外的任何内容。


Hi,

I''m working on a select statement to retrieve data, which I know(data exists) is in the MySQL DB.

Here is the part I''m working on:

Expand|Select|Wrap|Line Numbers

解决方案

Hey.

Are you sure you have started the session on that page (with session_start)?
In any case, you should verify the ID before trying to put it into the query. You can use the isset function on the


_SESSION[''sesRecipeID''] element to do that.

and it also isn''t telling me what the value of


sqlString is either

You are printing the wrong variable. Your echo is printing the result of the mysql_query call, rather than the query string, which will never print anything other than FALSE or a resource ID.


这篇关于mltple表查询错误:查询为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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