原帖由 llw318 于 2006-1-23 23:02 发表
错误:
提示:
Discuz! info: MySQL Query Error
User: admin
Time: 2006-1-23 11:00pm
Script: /plugin.php
SQL: SELECT u.* , m.username,i.imagename,i.endurance as dates,i.cost FROM cdb_images_ ...
原作者發佈解決辦法
凡出現下列錯誤訊息
Unknown column 'u.imagefrom' in 'on clause'
应该是 MySQL 5.x + PHP 5.x 的版本才会出现此问题
可按下办法修正
virtualimages/images_user.php
找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '1' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename, i.endurance as dates FROM ($tablepre"."images_user u, $tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '1' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
再找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '0' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename, i.endurance as dates FROM ($tablepre"."images_user u, $tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '0' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
virtualimages/images_bad.php
找
- $imagesquery = $db->query("SELECT u.* , m.username,i.imagename,i.endurance as dates,i.cost FROM $tablepre"."images_user u ,$tablepre"."images_data i LEFT JOIN $tablepre"."members m ON m.uid = u.imagefrom WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '3' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
更换
- $imagesquery = $db->query("SELECT u.*, m.username,i.imagename,i.endurance as dates,i.cost FROM ($tablepre"."images_user u ,$tablepre"."images_data i) LEFT JOIN $tablepre"."members m ON (m.uid = u.imagefrom) WHERE u.userid = '$imagesuser[uid]' AND u.dafaultuse = '3' AND i.sort=u.classid AND i.graphic=CONCAT(u.picid,'.gif') ORDER BY u.buydata");
复制代码
~完成~
[ 本帖最后由 poka 于 2006-2-3 13:49 编辑 ] |