المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : :: اخطاء وحلول مشاكل قاعدة البيانات ::



walid
11-02-2013, بتوقيت غرينيتش 12:59 AM
--------------------------------------------------------------------------------

السلام عليكم

هنا ان شاء الله تجد مشاكل وحلول قواعد البيانات


المشكله
Invalid SQL:
SELECT forum.forumid, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount
FROM forum AS forum

mysql error: Unknown column 'lastthread' in 'field list'

mysql error number: 1054

Date: Monday 30th of May 2014 10:57:27 AM


الحل
ازرع ها الامرين



ALTER TABLE `forum` ADD `lastthread` CHAR( 250 ) NOT NULL ;








ALTER TABLE `forum` ADD `lastthreadid` INT( 10 ) NOT NULL ;








======================================== ========== ======

المشكلة
:

Invalid SQL: SELECT whoviewed FROM thread WHERE threadid = 5879
mysql error: Unknown column 'whoviewed' in 'field list'

mysql error number: 1054

Date: Tuesday 31st of May 2014 02:02:03 PM

الحل

اعمل اصلاح للجداول وقاعدة البيانات

======================================== =========
المشكله
Invalid SQL: SELECT u.userid, u.username FROM user u WHERE u.downloads LIKE "32%" OR u.downloads LIKE "%32%" OR u.downloads LIKE "%32" ORDER BY u.username ASC
mysql error: Unknown column 'u.downloads' in 'where clause'

mysql error number: 1054


الحل
ازرع الامر التالي



ALTER TABLE `user` ADD `downloads` text NOT NULL;





======================================== ========== =
المشكلة

Database error in فيبويلتن في بي vBulletin 3.0.7:

Invalid SQL:
UPDATE poll
SET votes = '1|||0|||0|||0',
voters = voters + 1,
lastvote = 1118582446
WHERE pollid = 2

mysql error: Unknown column 'lastvote' in 'field list'

mysql error number: 1054

Date: Sunday 12th of June 2014 10:20:46 AM


الحل
ازرع الامر التالي
ALTER TABLE `poll` ADD `lastvote` INT(15) DEFAULT '0' NOT NULL;

========================================
المشكلة
<!--
Database error in فيبويلتن في بي vBulletin :

Link-ID == false, connect failed
mysql error:

mysql error number: 0

Date: Monday 13th of March 2014 03:16:31 AM

الحل

قاعدة البيانات فصله من السيرفر SERVER

======================================== =

المشكله
Database error in فيبويلتن في بي vBulletin 3.5.3:

Invalid SQL:

SELECT
IF(votenum >= 1, votenum, 0) AS votenum,
IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open,
replycount, postusername, postuserid, thread.iconid AS threadiconid,
thread.lastpost, lastposter, thread.dateline, IF(views<=replycount,
replycount+1, views) AS views, notes, thread.visible, sticky, votetotal,
thread.attach,
hiddencount
, NOT ISNULL(subscribethread.subscribethreadid ) AS issubscribed
, deletionlog.userid AS del_userid, deletionlog.username AS del_username,
deletionlog.reason AS del_reason

FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid =
deletionlog.primaryid AND type = 'thread')
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid =
thread.threadid AND subscribethread.userid = 1)

LEFT JOIN post AS post ON(post.postid = thread.firstpostid)


WHERE thread.threadid IN
(0,1478,1394,1447,1489,1487,1485,1481,13 70,1476,13 59,1421,1424,1269,1387,1231,1348,1239,14 37,1417,14 48,91,460,420,507,1395)
ORDER BY sticky DESC, thread.lastpost DESC;

MySQL Error : Can't open file: 'post.MYI'. (errno: 144)
Error Number : 1016
Date : Sunday, March 5th 2014 @ 09:16:17 AM

الحل

اصلاح قواعد البيانات والجداول

وقالب templateآ ما يجيك هذا الخطاء
Can't open file:xxxMYI

======================================== ========

المشكلة
Invalid SQL:

SELECT
user.username, (user.options &amp; 512) AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity &gt; 1141921235
ORDER BY username ASC;

MySQL Error : Can't open file: 'session.MYI' (errno: 145)
Error Number : 1016
Date : Thursday, March 9th 2014 @ 08:35:36 AM

الحل

ازرع الامرين




DELETE FROM session;








CREATE TABLE session (
sessionhash varchar(32) NOT NULL default '',
userid int(10) unsigned NOT NULL default '0',
host varchar(15) NOT NULL default '',
lastactivity int(10) unsigned NOT NULL default '0',
styleid smallint(5) unsigned NOT NULL default '0',
location varchar(255) NOT NULL default '',
althash varchar(32) NOT NULL default '',
badlocation tinyint(3) unsigned NOT NULL default '0',
inforum smallint(5) unsigned NOT NULL default '0',
inthread int(10) unsigned NOT NULL default '0',
incalendar int(10) unsigned NOT NULL default '0',
loggedin smallint(5) unsigned NOT NULL default '0',
idhash varchar(32) NOT NULL default '',
useragent varchar(100) NOT NULL default '',
bypass smallint(6) NOT NULL default '0',
PRIMARY KEY (sessionhash)
) TYPE=HEAP;
احترامي لكم
راعي النسيان




https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©

استعمل مربع البحث في الاسفل لمزيد من المواضيع


سريع للبحث عن مواضيع في المنتدى