Php/MySQL Error, hope someone can help :P.
Posted: Sat Jun 10, 2006 7:07 pm
First off the explination
. I recently, added a Mod for Phpbb from http://www.phpbb.com called "Event Registration". SINCE they do not support Nuke Evolution I am stuck with trying to port, so to speak, it myself. I have fixed most the error's except this one which doesn't seem to be directly pointed to the Mod in anyway. But the mod may be causing this, here is the error and code's which you will need to understand my problem
.
functions_post.php Lines 505 - 513
For my "MYSQL" which it is refering here is what the table would look like if you were adding it to MySQL
This is what entering a table should approximately look like
.
I was messing around with the functions_post.php adding certain MySQL things which wern't there on the original file but it was to no avail. I can't quite put my finger on what's causing this error. If you find it PLZ let me know, if it has nothing to do with this then also let me know. Thank you, I kinda need a quick reply because my site require's that to work before I can continue with anything else.
Oh and it is happening when I go to CREATE a post, not when I edit it which seems to confuse the piss out of me, but none the less the Error was on 509 which means it must be around that section. Thank you.
If you don't know what your doing, DO NOT attempt to help me, because I don't need my site all jacked up beyond repair. Please let those who have somewhat of an idea help, if you think you can contribute please do so, but do NOT attempt to support if your not familure with php. Those familure with phpbb this is the same thing, nothing is different with phpbb and the phpbb that comes with Nuke Evo except the MySQL and very few code changes for easier integration with Nuke Evo, thank you.


Code: Select all
Error in posting
DEBUG MODE
SQL Error : 1064 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 ' '', '', '44778594', '', '', '', '')' at line 1
INSERT INTO nuke_bbposts (post_id, topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ('', '', , '', '', '44778594', '', '', '', '')
Line : 509
File : functions_post.php
Code: Select all
505- $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
506- $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (post_id, topic_id, forum_id, poster_id, post_time, poster_ip, post_username, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ('$topic_id', '$forum_id', " . $userdata['user_id'] . ", '$post_username', '$current_time', '$user_ip', '$bbcode_on', '$html_on', '$smilies_on', '$attach_sig')" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = '$bbcode_on', enable_html = '$html_on', enable_smilies = '$smilies_on', enable_sig = '$attach_sig'" . $edited_sql . " WHERE post_id = '$post_id'";
507- if (!$db->sql_query($sql))
508- {
509- message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
510- }
511-
512- if ($mode != 'editpost')
513- {
Code: Select all
CREATE TABLE `nuke_bbposts` (
`post_id` mediumint(8) unsigned NOT NULL auto_increment,
`topic_id` mediumint(8) unsigned NOT NULL default '0',
`forum_id` smallint(5) unsigned NOT NULL default '0',
`poster_id` mediumint(8) NOT NULL default '0',
`post_time` int(11) NOT NULL default '0',
`poster_ip` varchar(8) NOT NULL default '',
`post_username` varchar(25) default NULL,
`enable_bbcode` tinyint(1) NOT NULL default '1',
`enable_html` tinyint(1) NOT NULL default '0',
`enable_smilies` tinyint(1) NOT NULL default '1',
`enable_sig` tinyint(1) NOT NULL default '1',
`post_edit_time` int(11) default NULL,
`post_edit_count` smallint(5) unsigned NOT NULL default '0',
`post_attachment` tinyint(1) NOT NULL default '0',
`post_move` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`post_id`),
KEY `forum_id` (`forum_id`),
KEY `topic_id` (`topic_id`),
KEY `poster_id` (`poster_id`),
KEY `post_time` (`post_time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
This is what entering a table should approximately look like

Code: Select all
1-INSERT INTO `nuke_bbposts` VALUES (13, 6, 9, 2, 1149916006, '44778594', '', 1, 1, 1, 0, NULL, 0, 0, 0);
2-INSERT INTO `nuke_bbposts` VALUES (12, 6, 9, 3, 1149817358, 'cb0a7950', '', 1, 1, 1, 1, NULL, 0, 0, 0);
3-INSERT INTO `nuke_bbposts` VALUES (11, 5, 19, 2, 1149598762, '42be7683', '', 1, 1, 1, 0, NULL, 0, 0, 0);
4-INSERT INTO `nuke_bbposts` VALUES (10, 4, 1, 2, 1149006545, '44bf104b', '', 1, 1, 1, 0, NULL, 0, 0, 0);
I was messing around with the functions_post.php adding certain MySQL things which wern't there on the original file but it was to no avail. I can't quite put my finger on what's causing this error. If you find it PLZ let me know, if it has nothing to do with this then also let me know. Thank you, I kinda need a quick reply because my site require's that to work before I can continue with anything else.
Oh and it is happening when I go to CREATE a post, not when I edit it which seems to confuse the piss out of me, but none the less the Error was on 509 which means it must be around that section. Thank you.
If you don't know what your doing, DO NOT attempt to help me, because I don't need my site all jacked up beyond repair. Please let those who have somewhat of an idea help, if you think you can contribute please do so, but do NOT attempt to support if your not familure with php. Those familure with phpbb this is the same thing, nothing is different with phpbb and the phpbb that comes with Nuke Evo except the MySQL and very few code changes for easier integration with Nuke Evo, thank you.