I don't know if this is the same error that a previous post was about, but there is an extra comma in the mysql table creation function below. I removed the comma at the end of the messageid field creation statement and the tables built fine.

function chatblock_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {chatblock} (
message varchar(255),
username varchar(60),
timestamp int(10),
messageid int(10) NOT NULL auto_increment,
PRIMARY KEY messageid
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;"

Thanks and keep up the good work,
Scott Wagner

CommentFileSizeAuthor
#4 chatblock_install.patch698 byteshunmonk

Comments

scottwagner’s picture

I spoke too soon. The tables were not built.

dwees’s picture

Assigned: Unassigned » dwees

Try again with the newest version. I haven't made a patch, but I've edited the code slightly.

Dave

scottwagner’s picture

I downloaded the latest version but the tables still do not build, the error messsage is a syntax error the create table sql in the install file. If I build the tables manually the error messages go away but chat still does not work -- nulls are entered in the message field in the database. There was one time that an actual message was entered -- that time the page refreshed -- although I thought this was handled by ajax.

hunmonk’s picture

StatusFileSize
new698 bytes

attached patch fixes the issue -- gotta have parentheses around a key declaration.

hunmonk’s picture

Status: Active » Needs review
dwees’s picture

Title: Mysql table build synatx error » Mysql table build syntax error

Okay I'll incorporate this patch into a release tonight. Also Scott, can you post a link to a site where you are having these issues? I had the null issues before, but I thought I had fixed it, and that it was now working.

Dave

dwees’s picture

Status: Needs review » Closed (fixed)

This issue should be closed with the latest release. Download it in a few hours.

Dave