Script URL:
Version of script: 2.0
Hosting company: localhost IIS
URL of phpinfo.php: localhost
URL of session_test.php: localhost
What terms did you try when SEARCHING for a solution: hesk_replies, staffid, Can't execute SQL
Write your message below:
Can't execute SQL: INSERT INTO `hesk_replies` ( `replyto`,`name`,`message`,`dt`,`attachments` ) VALUES ( '1','Mark Sarpy','can you fix that?',NOW(),'' )
MySQL said:
Field 'staffid' doesn't have a default value
Please notify webmaster at
every time i reply to my own ticket i get that error, admin can reply but you cant reply to your own ticket.. im running PHP 5.2.8 and mySQL server 5.0 if that matters.
Can't execute SQL: INSERT INTO `hesk_replies`
Moderator: mkoch227
1. Save this code as dbupdate.php:
2. upload to server
3. open in browser
4. delete the file from the server
Code: Select all
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','');
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/database.inc.php');
hesk_dbConnect();
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."replies` CHANGE `staffid` `staffid` SMALLINT( 5 ) DEFAULT 0 ";
hesk_dbQuery($sql);
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."replies` CHANGE `rating` `rating` ENUM( '1','5' ) DEFAULT NULL ";
hesk_dbQuery($sql);
echo "Database modified";
?>
3. open in browser
4. delete the file from the server
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools