本地SQL和主机SQL之间的区别 [英] Difference between local SQL and host SQL

查看:73
本文介绍了本地SQL和主机SQL之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在php文件中遇到一些SQL问题。棘手的是,代码在本地工作得很好,当我将它加载到主机时我只有问题。


代码用于检查是否存在所需的用户名数据库。如果是,则在输入数据时通知用户使用AJAX过程。此过程的一部分使用包含要检查的项的查询字符串调用php文件(datacheck.php)。问题的代码是:

Hi,

I have a problem with some SQL inside a php file. The tricky thing is that the code works just fine locally and I only have the problems when I load it to the host.

The code is used to check if the desired username exists in the database. If it does then the user is informed, at the time of entering the data, using an AJAX process. Part of this process call a php file (datacheck.php) with a query string that contains the item to check. The code that is the problem is this:

展开 | 选择 | Wrap | 行号

推荐答案

[PHP]


lcItemToCheck = mysql_real_escape_string(
lcItemToCheck = mysql_real_escape_string(


_GET [''tocheck'']);
_GET[''tocheck'']);


这篇关于本地SQL和主机SQL之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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