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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | chatblock_install.patch | 698 bytes | hunmonk |
Comments
Comment #1
scottwagner commentedI spoke too soon. The tables were not built.
Comment #2
dwees commentedTry again with the newest version. I haven't made a patch, but I've edited the code slightly.
Dave
Comment #3
scottwagner commentedI 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.
Comment #4
hunmonk commentedattached patch fixes the issue -- gotta have parentheses around a key declaration.
Comment #5
hunmonk commentedComment #6
dwees commentedOkay 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
Comment #7
dwees commentedThis issue should be closed with the latest release. Download it in a few hours.
Dave