我有一个 php 脚本,显示500 Internal Server Error
ff 行是否在查询中。
CONVERT(INT,cast(reverse(substring(char_data, 301, 4)) as BINARY(4))) AS maxexperience
当我删除它时,一切都会很好。
$SQL = "SELECT TOP 10
CONVERT(VARCHAR,substring(char_data, 9, 16)) AS name,
CONVERT(INT,cast(reverse(substring(char_data, 7, 2)) as BINARY(2))) AS level,
CONVERT(INT,substring(char_data, 25, 1)) AS type,
CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) AS strength,
CONVERT(INT,cast(reverse(substring(char_data, 265, 2)) as BINARY(2))) AS wisdom,
CONVERT(INT,cast(reverse(substring(char_data, 267, 2)) as BINARY(2))) AS dexterity,
CONVERT(INT,cast(reverse(substring(char_data, 269, 2)) as BINARY(2))) AS charisma,
CONVERT(INT,cast(reverse(substring(char_data, 271, 2)) as BINARY(2))) AS intelligence,
CONVERT(INT,cast(reverse(substring(char_data, 273, 2)) as BINARY(2))) AS constitution,
CONVERT(INT,cast(reverse(substring(char_data, 309, 2)) as BINARY(2))) AS fame,
CONVERT(INT,cast(reverse(substring(char_data, 301, 4)) as BINARY(4))) AS maxexperience
FROM CHAR_DATA0 WHERE CONVERT(INT, substring(char_data, 261, 1))=0x00 ORDER BY level DESC";
我尝试从 MSSMS - 2008 运行相同的脚本
name level type strength wisdom dexterity charisma intelligence constitution fame maxexperience
ladycharm 340 4 3510 1210 5200 2001 1120 4236 14265 1782451348
它确实有效。但是从 php 脚本它给出了一个错误。请指教?谢谢你。
--- cpanel 上的错误日志 ---
[Sat Jul 28 13:01:24 2012] [error] [client IP] File does not exist: /home/blazegam/public_html/test/404.shtml
[Sat Jul 28 13:01:24 2012] [error] [client IP] File does not exist: /home/blazegam/public_html/test/favicon.ico
[Sat Jul 28 13:00:38 2012] [error] [client IP] File does not exist: /home/blazegam/public_html/test/404.shtml
[Sat Jul 28 13:00:38 2012] [error] [client IP] File does not exist: /home/blazegam/public_html/test/favicon.ico
检查了所有日志,甚至尝试制作应该出错的脚本。我看到了那个脚本的错误。但不适用于这个脚本。它没有记录错误。