PDA

View Full Version : Database Error!


Bakie
08-31-2005, 07:58 AM
Here are a few errors that I am getting from my forum so at the moment nothing works (except the admincp and the index and forumdisplay) :


Database error in vBulletin 3.0.8:

Invalid SQL: select w.*, u.username as warner from warn_notes w
LEFT JOIN user u on(u.userid=w.warned_by)
where warned_user='8' order by warned_time desc
mysql error: Table 'bxhtptbr_vbforum.warn_notes' doesn't exist

mysql error number: 1146

Date: Wednesday 31st of August 2005 03:05:58 AM
Script: http://www.freeformforum.com/showthread.php?t=41


Database error in vBulletin 3.0.8:

Invalid SQL: select w.*, u.username as warner from warn_notes w
LEFT JOIN user u on(u.userid=w.warned_by)
where warned_user='1' order by warned_time desc
mysql error: Table 'bxhtptbr_vbforum.warn_notes' doesn't exist

mysql error number: 1146

Date: Wednesday 31st of August 2005 03:05:37 AM




Database error in vBulletin 3.0.8:

Invalid SQL: select w.*, u.username as warner from warn_notes w
LEFT JOIN user u on(u.userid=w.warned_by)
where warned_user='11' order by warned_time desc
mysql error: Table 'bxhtptbr_vbforum.warn_notes' doesn't exist

mysql error number: 1146

Date: Wednesday 31st of August 2005 02:06:31 AM
Script: http://www.freeformforum.com/member.php?u=11
Referer:
Username: Unregistered
IP Address: **.**.**.**


What have I done wrong?

I was upgrading from Zero Tolerance's hack 1.5 to AWS.

Boofo
08-31-2005, 08:08 AM
It looks like you didn't run the query to make the warn_notes table. ;)

Bakie
08-31-2005, 08:13 AM
Where and how do I do this?

Boofo
08-31-2005, 09:20 AM
Since you can't get on your site, you will have to go to phpmyadmin and run the query from there.

Bakie
08-31-2005, 09:22 AM
I can get into the admincp, does that help? If I have to use phpmyadmin what exactly do I have to do? (Im new to this)
What query do I have to run?

sv1cec
08-31-2005, 10:54 AM
Try runninng the install_warn.php script again. In other words, point your browser to :

http://www.yourdomain.com/admincp/install_warn.php

That should create the table for you. If that fails, use the following query:


CREATE TABLE `bxhtptbr_vbforum.warn_notes` (
`wid` int(15) NOT NULL auto_increment,
`warned_user` int(15) NOT NULL default '0',
`warned_by` int(15) NOT NULL default '0',
`warned_time` int(15) NOT NULL default '0',
`warned_note` text NOT NULL,
`warned_post` int(15) NOT NULL default '0',
`warned_type` smallint NOT NULL default '1',
PRIMARY KEY (`wid`)


Please note that I've used the table prefix shown in your error messages above.

Let me know if that helps.

Bakie
08-31-2005, 11:13 AM
I am upgrading Zero Tolerance's hack 1.5 so can I run install_warn.php?

I tried it in phpmyadmin but it comes up with this error:
#1103 - Incorrect table name 'bxhtptbr_vbforum.warn_notes'

sv1cec
08-31-2005, 11:41 AM
Try running the above query from your adminCP. Or, run it through phpmyadmin, without using the table prefix in front of the name, in other words, run it like this:


CREATE TABLE `warn_notes` (
`wid` int(15) NOT NULL auto_increment,
`warned_user` int(15) NOT NULL default '0',
`warned_by` int(15) NOT NULL default '0',
`warned_time` int(15) NOT NULL default '0',
`warned_note` text NOT NULL,
`warned_post` int(15) NOT NULL default '0',
`warned_type` smallint NOT NULL default '1',
PRIMARY KEY (`wid`)


I just noticed you had upgrade from ZT's hack, that's why it didn't add that table for you, I haven't updated that script to the latest release.

Bakie
08-31-2005, 11:47 AM
Another error:
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9

sv1cec
08-31-2005, 11:56 AM
LoL, yes, I didn't match the opening parenthesis, did I?

Try this:


CREATE TABLE `warn_notes` (
`wid` int(15) NOT NULL auto_increment,
`warned_user` int(15) NOT NULL default '0',
`warned_by` int(15) NOT NULL default '0',
`warned_time` int(15) NOT NULL default '0',
`warned_note` text NOT NULL,
`warned_post` int(15) NOT NULL default '0',
`warned_type` smallint NOT NULL default '1',
PRIMARY KEY (`wid`)
)

Bakie
08-31-2005, 11:59 AM
Thanks, thats it :)

sv1cec
08-31-2005, 12:08 PM
Most welcome! Glad we sort this out.