Inserting new record i guestbook failed in my site, a little debugging
ended up with the following fix:
The SQL query for INSERT end with a semicolon, in cnt18.article.inc.php
This is not allowed for 'mysql_query' .
BTW, the frontend_init/sample.php generate output that make error after inserting a guestbook entry when using flooding cookie.
Rolf
SQL bug in guestbook
SQL bug in guestbook
Rolf Dahl
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Take a look here:Oliver Georgi wrote:can you send or show me a sample?
I have never heard that ending sql query with a semicolon is nor allowed.
Oliver
http://no.php.net/manual/en/function.mysql-query.php
It's strange that the 22/6 version did not give any problem with
the ending semicolon.
Rolf Dahl
Same for me
I upgraded to 22/8 and I am getting errors on some of the sql as well. Some things like uploading a file works and editing an article works, but adding a structure_level or new article doesn't work.
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
These are neccessary sql upgrades:
Check that you just have not upgraded files only - but also upgraded your db too.
Check table names and see the connection with your error messages for: guestbook, structure and articles.
And there is no information about ending semicolons in SQL queries. This is correct!
Oliver
Code: Select all
ALTER TABLE `phpwcms_guestbook` ADD `guestbook_show` INT( 1 ) NOT NULL ;
ALTER TABLE `phpwcms_guestbook` CHANGE `guestbook_url` `guestbook_url` TEXT NOT NULL ;
ALTER TABLE `phpwcms_guestbook` CHANGE `guestbook_email` `guestbook_email` TEXT NOT NULL ;
ALTER TABLE `phpwcms_guestbook` CHANGE `guestbook_name` `guestbook_name` TEXT NOT NULL ;
ALTER TABLE `phpwcms_guestbook` ADD `guestbook_ip` VARCHAR( 20 ) NOT NULL ;
ALTER TABLE `phpwcms_guestbook` ADD `guestbook_useragent` VARCHAR( 50 ) NOT NULL ;
ALTER TABLE `phpwcms_articlecat` ADD `acat_order` INT( 2 ) NOT NULL ;
ALTER TABLE `phpwcms_article` ADD `article_created` VARCHAR( 14 ) NOT NULL ;
UPDATE `phpwcms_article` SET `article_created` = UNIX_TIMESTAMP( `article_tstamp` ) WHERE `article_created` = '';
Check table names and see the connection with your error messages for: guestbook, structure and articles.
And there is no information about ending semicolons in SQL queries. This is correct!
Oliver