MySQL table doesn't update, can't find the error message - php

My knowledge level here is like zilch, but please bear with me.
I have a site built in PHP/MySQL that uses the Smarty template engine. There's a registration form that, for some reason, isn't posting the data to the DB. Here's the function:
$u = new H_User;
$u->setFrom($p);
$smarty->assign('user', $u);
$val = $u->validate();
if ($val === true) {
$temp = new H_User;
$temp->orderBy('user_id desc');
$temp->find(true);
$next_id = $temp->user_id + 1;
$u->user_id = $next_id;
$u->user_password = md5($p['user_password']);
$u->user_regdate = mktime();
$u->user_active = 0;
$u->insert();
$hash = md5($u->user_email . $u->user_regdate);
$smarty->assign('hash', $hash);
$smarty->assign('user', $u);
$smarty->assign('registration_complete', true);
$d = new H_Demographic;
$d->setFrom($p);
$d->insert();
How can I figure out what's wrong here? I don't get any PHP errors and I don't know how to get MySQL to display the errors that might indicate what's wrong with that syntax.
MORE INFO AS PER REQUESTS
#
# Table structure for table `user`
#
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` mediumint(8) NOT NULL default '0',
`user_active` tinyint(1) default '1',
`username` varchar(25) NOT NULL default '',
`user_password` varchar(32) NOT NULL default '',
`user_session_time` int(11) NOT NULL default '0',
`user_session_page` smallint(5) NOT NULL default '0',
`user_lastvisit` int(11) NOT NULL default '0',
`user_regdate` int(11) NOT NULL default '0',
`user_level` tinyint(4) default '0',
`user_posts` mediumint(8) unsigned NOT NULL default '0',
`user_timezone` decimal(5,2) NOT NULL default '0.00',
`user_style` tinyint(4) default NULL,
`user_lang` varchar(255) default NULL,
`user_dateformat` varchar(14) NOT NULL default 'd M Y H:i',
`user_new_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_unread_privmsg` smallint(5) unsigned NOT NULL default '0',
`user_last_privmsg` int(11) NOT NULL default '0',
`user_emailtime` int(11) default NULL,
`user_viewemail` tinyint(1) default NULL,
`user_attachsig` tinyint(1) default NULL,
`user_allowhtml` tinyint(1) default '1',
`user_allowbbcode` tinyint(1) default '1',
`user_allowsmile` tinyint(1) default '1',
`user_allowavatar` tinyint(1) NOT NULL default '1',
`user_allow_pm` tinyint(1) NOT NULL default '1',
`user_allow_viewonline` tinyint(1) NOT NULL default '1',
`user_notify` tinyint(1) NOT NULL default '1',
`user_notify_pm` tinyint(1) NOT NULL default '0',
`user_popup_pm` tinyint(1) NOT NULL default '0',
`user_rank` int(11) default '0',
`user_avatar` varchar(100) default NULL,
`user_avatar_type` tinyint(4) NOT NULL default '0',
`user_email` varchar(255) default NULL,
`user_icq` varchar(15) default NULL,
`user_website` varchar(100) default NULL,
`user_from` varchar(100) default NULL,
`user_sig` text,
`user_sig_bbcode_uid` varchar(10) default NULL,
`user_aim` varchar(255) default NULL,
`user_yim` varchar(255) default NULL,
`user_msnm` varchar(255) default NULL,
`user_occ` varchar(100) default NULL,
`user_interests` varchar(255) default NULL,
`user_actkey` varchar(32) default NULL,
`user_newpasswd` varchar(32) default NULL,
`first_name` varchar(40) NOT NULL default '',
`last_name` varchar(40) NOT NULL default '',
`level` int(10) unsigned NOT NULL default '0',
`disabled` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`user_id`),
KEY `user_session_time` (`user_session_time`)
) TYPE=MyISAM;

I'm still trying to figure this out and dump this in as a comment vs. an answer so I apologize if this shows up as an answer because it is not. Try putting the following code to spit out your errors:
error_reporting(E_ALL);
ini_set('display_errors', '1');
You may want to look at your php.ini file to allow displaying errors as well.

Do you have access to your server error log? That should show MySQL errors, I think. But as Pekka said, this isn't really enough info to go on.

MySQL connections all have a way to access the last errors thrown by them. It depends on which method you're using to connect to the DB. For instance, I use mysqli class. Therefore, as an example directly from PHP's website:
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if (!$mysqli->query("SET a=1")) {
printf("Errormessage: %s\n", $mysqli->error);
}
is how I could connect and then retrieve an error if it was thrown. How are you sending data to the DB? Do you have an example of the code that injects the data into the DB?

put
trigger_error(mysql_error());
after
$d->insert();
Edit:
As Marc B pointed out, you would need to use
trigger_error(mysqli_error());
instead for mysqli_ functions. PHP can be lame sometimes.

Related

mysql INSERT command issue

Following is my table structure:
CREATE TABLE `order` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`RenterRole_ID` INT(11) NULL DEFAULT NULL,
`CreationTime` DATETIME NULL DEFAULT NULL,
`BeginRentingDate` DATETIME NULL DEFAULT NULL,
`EndRentingDate` DATETIME NULL DEFAULT NULL,
`TripStartDate` DATETIME NULL DEFAULT NULL,
`TripEndDate` DATETIME NULL DEFAULT NULL,
`DeliveryDetails` VARCHAR(255) NULL DEFAULT NULL,
`ReturningDetails` VARCHAR(255) NULL DEFAULT NULL,
`SpareSpotBatteries` INT(11) NULL DEFAULT NULL,
`spareInReach15Batteries` INT(11) NULL DEFAULT NULL,
`Remarks` TEXT NULL,
`OrdersCenter_ID` INT(11) NOT NULL DEFAULT '100',
`HashedCCNumber` VARCHAR(255) NULL DEFAULT NULL,
`CCExpiration` DATETIME NULL DEFAULT NULL,
`CCHolderName` VARCHAR(255) NULL DEFAULT NULL,
`CreatingController` VARCHAR(255) NULL DEFAULT NULL,
`Debug` BIT(1) NOT NULL DEFAULT b'0',
`TravelInsuranceOffer` BIT(1) NULL DEFAULT b'0',
`DeviceInsurance` BIT(1) NULL DEFAULT b'0',
`OrdersCenterRemarks` TEXT NULL,
`Rivhit` VARCHAR(100) NULL DEFAULT NULL,
`Invoice` VARCHAR(100) NULL DEFAULT NULL,
`Payment` VARCHAR(200) NULL DEFAULT NULL,
PRIMARY KEY (`ID`),
INDEX `FK_OrderOrdersCenter_idx` (`OrdersCenter_ID`),
INDEX `FK_OrderRenterRole_idx` (`RenterRole_ID`),
CONSTRAINT `FK_OrderOrdersCenter` FOREIGN KEY (`OrdersCenter_ID`) REFERENCES `orderscenter` (`ID`),
CONSTRAINT `FK_OrderRenterRole` FOREIGN KEY (`RenterRole_ID`) REFERENCES `renter_role` (`ID`)
)
when i try to INSERT data by following code:
$query = "INSERT INTO order (RenterRole_ID) VALUES (?)";
$stmt = $mysqli->prepare($query);
if (false === $stmt) {
echo 'prepare() failed: ' . htmlspecialchars($mysqli->error);
die();
}
$stmt->bind_param('i',$newRenterId);
if (false === $bind) {
echo 'bind_param() failed: ' . htmlspecialchars($stmt->error);
die();
}
$stmt->execute();
$newOrderId = $stmt->insert_id;
$stmt->close();
cause following error:
prepare() failed: 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 'order (RenterRole_ID) VALUES (?)' at line 1
in other table INSERT code is working good only order table having issues.

mysql query error on my live server which I don't get on my test version of MySQL

Error
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB:
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 '\'187\'' at line 2
PHP code:
$sql9 = "UPDATE prior_approval SET approved = 1, rejected = 0 WHERE id= '" . mysql_real_escape_string($app_id) . "'";
$result9 = mysql_query($sql9) or die(mysql_error());
The test MySQL version is 5.6 and the live version is 5.1. An error message on the ISP's control panel says that the mysql version should be updated.
I have used mysqli as well but that failed so I reverted to mysql
using mysqli code:
$app_id = $_SESSION['app_id'];
$conn = mysqli_connect('localhost',$username,$password,$database);
$sql9 = "UPDATE prior_approval SET approved = 1, rejected = 0 WHERE id= (?)";
$stmt = $conn->prepare($sql9);
$stmt->bind_param('i',$app_id);
$result9 = $stmt->execute();
Resulting error:
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB: 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 '\'187\'' at line 2
New error including vardump:
string(7) "\'187\'"
Could not successfully run query (SELECT * FROM prior_approval WHERE id = \'187\') from DB: 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 '\'187\'' at line 2
Table create:
CREATE TABLE IF NOT EXISTS `prior_approval` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`approv_id` int(6) DEFAULT NULL,
`dist_code` varchar(30) DEFAULT NULL,
`dealer_code` varchar(30) DEFAULT NULL,
`reporter` varchar(50) DEFAULT NULL,
`report_date` date DEFAULT NULL,
`job_kind` int(1) DEFAULT NULL,
`attach` int(1) DEFAULT NULL,
`reply` tinyint(1) DEFAULT NULL,
`engine_oil` int(1) DEFAULT NULL,
`nature_code` varchar(50) DEFAULT NULL,
`model` varchar(10) DEFAULT NULL,
`causal_code` varchar(50) DEFAULT NULL,
`part_code` varchar(20) DEFAULT NULL,
`part_descr` varchar(20) DEFAULT NULL,
`op_code` varchar(20) DEFAULT NULL,
`subject` varchar(50) DEFAULT NULL,
`reg_no_1` varchar(20) DEFAULT NULL,
`vin_1` varchar(17) DEFAULT NULL,
`engine_1` varchar(10) DEFAULT NULL,
`reg_date_1` date DEFAULT NULL,
`km_reading_1` varchar(10) DEFAULT NULL,
`repair_date_1` date DEFAULT NULL,
`repl_no_1` varchar(20) DEFAULT NULL,
`complaint_nature` varchar(1000) DEFAULT NULL,
`sub_repair` varchar(1000) DEFAULT NULL,
`corr_action` varchar(1000) DEFAULT NULL,
`act_result` varchar(1000) DEFAULT NULL,
`recommend` varchar(1000) DEFAULT NULL,
`compl_period` varchar(10) NOT NULL,
`compl_number` int(11) NOT NULL,
`compl_freq` int(11) NOT NULL,
`while_stopped` tinyint(1) NOT NULL,
`during_braking` tinyint(1) DEFAULT NULL,
`during_acc_coast` tinyint(1) DEFAULT NULL,
`during_forward_rev` tinyint(1) DEFAULT NULL,
`during_turn` tinyint(1) DEFAULT NULL,
`turn_speed` int(11) DEFAULT NULL,
`during_rough` tinyint(1) DEFAULT NULL,
`rough_gear` varchar(10) DEFAULT NULL,
`during_decl_incr` tinyint(1) DEFAULT NULL,
`during_any_speed` tinyint(1) DEFAULT NULL,
`during_decel_coast` tinyint(1) DEFAULT NULL,
`using_brake` tinyint(1) DEFAULT NULL,
`using_ac` tinyint(1) DEFAULT NULL,
`using_defog` tinyint(1) DEFAULT NULL,
`using_steer` tinyint(1) DEFAULT NULL,
`using_wwash` tinyint(1) DEFAULT NULL,
`using_starter` tinyint(1) DEFAULT NULL,
`using_clutch` tinyint(1) DEFAULT NULL,
`using_radio` tinyint(1) DEFAULT NULL,
`using_other` tinyint(1) DEFAULT NULL,
`engine_idle` tinyint(1) DEFAULT NULL,
`engine_hot` tinyint(1) DEFAULT NULL,
`engine_start` tinyint(1) DEFAULT NULL,
`engine_cold` tinyint(1) DEFAULT NULL,
`engine_warm_up` tinyint(1) DEFAULT NULL,
`vary_car_speed` tinyint(1) DEFAULT NULL,
`vary_engine_speed` tinyint(1) DEFAULT NULL,
`vary_load` tinyint(1) DEFAULT NULL,
`vary_trunk_load` tinyint(1) DEFAULT NULL,
`how_always` tinyint(1) DEFAULT NULL,
`how_after` tinyint(1) DEFAULT NULL,
`after_speed` int(11) DEFAULT NULL,
`attach1` varchar(100) DEFAULT NULL,
`attach2` varchar(100) DEFAULT NULL,
`attach3` varchar(100) DEFAULT NULL,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`approved` tinyint(1) NOT NULL,
`rejected` tinyint(1) DEFAULT NULL,
`rejected_reason` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=186 ;
I had to convert the $app_id string to integer like this:
//$app_id = $_SESSION['app_id'];
$remove[] = "'";
$remove[] = "\\";
$app_id = (int)str_replace($remove,"", $_SESSION['app_id']);
The later version of MySQL seems to convert automatically.

MySQL indexes stop working

I am working on News website, the table (news) contain about 200,000 rows.
I use Zend framework 1.
the website was working very good, but from a week ago, I have found some errors in data retrieve from the queries.
I use zend paginator, like this:
$paginator = Zend_Paginator::factory($select);
$paginator->setItemCountPerPage(10);
$pageCounter = $paginator->count();
so $pageCounter return 0,
when I try to debug the error, I have tried to drop the indexes from the database table and create the index again, then the problem was resolved the website back to work again.
but every couple days this problem back again.
the tables I use is:
CREATE TABLE `news` (
`news_id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) DEFAULT NULL,
`news_type` enum('text','photo','video') DEFAULT 'text',
`news_title` varchar(255) NOT NULL,
`news_url` varchar(255) NOT NULL,
`news_date` datetime NOT NULL,
`news_image` varchar(255) DEFAULT NULL,
`video` varchar(255) DEFAULT NULL,
`news_source` int(11) NOT NULL DEFAULT '0',
`author_id` int(11) NOT NULL DEFAULT '0',
`news_brief` text,
`news_content` mediumtext,
`meta_title` varchar(255) NOT NULL,
`meta_description` varchar(255) DEFAULT NULL,
`meta_keywords` varchar(255) DEFAULT NULL,
`status` tinyint(2) NOT NULL DEFAULT '1',
`news_read` int(11) DEFAULT '0',
`old_id` int(11) DEFAULT NULL,
`old_section_id` int(11) DEFAULT NULL,
`old_section` varchar(50) DEFAULT NULL,
`lang` varchar(10) DEFAULT NULL,
`featured` int(11) NOT NULL DEFAULT '0',
`in_timeline` tinyint(2) NOT NULL DEFAULT '0',
`is_highlight` tinyint(2) NOT NULL DEFAULT '0',
`home_exclusive` tinyint(2) NOT NULL DEFAULT '0',
`home_articles` tinyint(4) NOT NULL DEFAULT '0',
`home_articles_selected` tinyint(4) NOT NULL DEFAULT '0',
`home_mostread` tinyint(4) NOT NULL DEFAULT '0',
`video_featured` tinyint(4) NOT NULL DEFAULT '0',
`photos_featured` tinyint(4) NOT NULL DEFAULT '0',
`party_featured` tinyint(4) NOT NULL DEFAULT '0',
`party_activity` tinyint(4) NOT NULL DEFAULT '0',
`sport_featured` tinyint(4) NOT NULL DEFAULT '0',
`fnoun_featured` tinyint(4) NOT NULL DEFAULT '0',
`special_reports` tinyint(4) NOT NULL DEFAULT '0',
`mainnav` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`news_id`),
KEY `News_Category_idx` (`category_id`),
KEY `News_Type` (`news_type`),
KEY `News_Date` (`news_date`),
KEY `News_Read` (`news_read`),
KEY `old_id` (`old_id`),
KEY `Sources` (`news_source`),
KEY `Authors` (`author_id`),
KEY `Featured` (`featured`),
KEY `Articles` (`home_articles`),
KEY `Mostread` (`home_mostread`),
KEY `video_featured` (`video_featured`,`photos_featured`),
KEY `party_activity` (`party_activity`),
KEY `sport_featured` (`sport_featured`,`fnoun_featured`),
KEY `old_section_id` (`old_section_id`),
KEY `old_section` (`old_section`),
KEY `old section id` (`old_section_id`),
KEY `old section` (`old_section`),
KEY `articles_selected` (`home_articles_selected`),
KEY `URL` (`news_url`),
KEY `special_reports` (`special_reports`),
KEY `mainnav` (`mainnav`),
KEY `status` (`status`),
KEY `in_timeline` (`in_timeline`),
KEY `is_highlight` (`is_highlight`),
KEY `home_exclusive` (`home_exclusive`),
KEY `party_featured` (`party_featured`),
FULLTEXT KEY `news_title` (`news_title`)
) ENGINE=InnoDB AUTO_INCREMENT=167614 DEFAULT CHARSET=utf8
the columns (status - featured - in_timeline - is_highlight) type was (ENUM) but I have changed to (tinyint)
It works for a few days, but the problem come back again.
so I have to drop the indexed and create it again.
I don't know what is the problem?
can anyone help, please.
The Explain Query, it's the same when the problem happen and after I drop the indexes and create it again.
SQL query: Explain SELECT `N`.`news_id`, `N`.`news_title`, `N`.`news_url`, `N`.`news_image`, `N`.`news_type`, `N`.`news_date`, `N`.`is_highlight`, `N`.`news_brief`, `C`.`category_name`, `C`.`category_url`, `C`.`category_color`, `NT`.*, GROUP_CONCAT(T.tag_name separator ",") AS tags, GROUP_CONCAT(T.tag_url separator ",") AS `tags_urls` FROM `news` AS `N` INNER JOIN `news_categories` AS `C` ON C.category_id = N.category_id AND C.status = "1" LEFT JOIN `news_tags_relation` AS `NT` ON NT.news_id = N.news_id LEFT JOIN `news_tags` AS `T` ON T.tag_id = NT.tag_id WHERE (N.status = "1" AND N.category_id = "22") GROUP BY `N`.`news_id` ORDER BY `N`.`news_date` DESC;
Rows: 4
This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
the table in the attached images

PDO update query runs changes no rows. No errors

So I'm running a PDO update working, and for some reason it won't update the table...
$business_id = 9874128;
$hidden = 1;
$query = "UPDATE business_property_overrides SET hidden=? WHERE business_id=?";
try {
$stmt = $pdo->prepare($query);
$stmt->execute(array($business_id, $hidden));
}
For some reason this won't update, even though I get no errors. The existing tables schema looks like this, and the data is:
There is an existing data set with business_id = 9874128 and hidden set to 0, but it won't update when I run the above code.
CREATE TABLE `business_property_overrides` (
`business_id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(512) NOT NULL,
`apt_type` varchar(25) DEFAULT NULL,
`apt_num` varchar(9) DEFAULT NULL,
`street_address` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL,
`state` varchar(255) DEFAULT NULL,
`zip` varchar(25) DEFAULT NULL,
`phone` varchar(11) DEFAULT NULL,
`url` varchar(512) DEFAULT NULL,
`hours` varchar(100) DEFAULT NULL,
`openhours` varchar(100) DEFAULT NULL,
`location` point DEFAULT NULL,
`yelp` varchar(512) DEFAULT '0',
`twitter` varchar(512) DEFAULT '0',
`hidden` tinyint(1) DEFAULT '0',
`merged` int(11) DEFAULT NULL,
`closed` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `business_id` (`business_id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9874134 DEFAULT CHARSET=utf8;
The hidden is TINYINT 1 characters long, you are assigning it business_id which is 7 characters long, that is the error.
Change
$stmt->execute(array($business_id, $hidden));
To:
$stmt->execute(array($hidden,$business_id))
As I've already commented over here, or you can simply use the placeholders of taking no care about the occurence like as
$query = "UPDATE business_property_overrides SET hidden = :hidden WHERE business_id = :business_id";
try {
$stmt = $pdo->prepare($query);
$stmt->execute(array(":business_id" => $business_id, ":hidden" => $hidden));
}

MYSQL ERROR when trying a dump

I am trying to install an older version of Joomla 1.5 on my server, my host has worked with me to allow 1.5 to install without error, however one of the issues is i need to do a mysql dump of the database, when i attempt to dump the database into the website i get the following error.
Error SQL query:
CREATE TABLE `jos_banner` ( `bid` int(11) NOT NULL auto_increment, `cid` int(11) NOT NULL default '0', `type` varchar(90) NOT NULL default 'banner', `name` text NOT NULL, `alias` varchar(255) NOT NULL default '', `imptotal` int(11) NOT NULL default '0', `impmade` int(11) NOT NULL default '0', `clicks` int(11) NOT NULL default '0', `imageurl` varchar(100) NOT NULL default '', `clickurl` varchar(200) NOT NULL default '', `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default '0', `checked_out` tinyint(1) NOT NULL default '0', `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(150) default NULL, `custombannercode` text, `catid` int(10) unsigned NOT NULL default '0', `description` text NOT NULL, `sticky` tinyint(1) unsigned NOT NULL default '0', `ordering` int(11) NOT NULL default '0', `publish_up` datetime NOT NULL default '0000-00-00 00:00:00', `publish_down` datetime NOT NULL default '0000-00-[...]
MySQL said: Documentation
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 'TYPE=MyISAM AUTO_INCREMENT=6' at line 29
Can anyone help me so i may correctly import the data?
Thanks again stackers.
Probably your MySQL version is new enough that it doesn't recognize the older "TYPE" keyword and is instead expecting "ENGINE". Try editing your SQL file and replacing TYPE with ENGINE in that line and see if it imports (or, at least, the error message changes). You can make that change in a text editor (which hopefully has good search-and-replace functionality to make it easy to find any other occurrences -- but don't just blindly replace them all in case your data contains the term).
As Action Dan requested, knowing the MySQL version would help. It's displayed on the main phpMyAdmin page.
Also, just a little note, "dump" is when you export from a database; as far as I know there's no analogous term for importing (but you don't dump in to a database, only out).
Try this code the mistake you have done is you have defined default value 0 in like this '0'
CREATE TABLE `jos_banner`(
`bid` int(11) NOT NULL auto_increment primary key,
`cid` int(11) NOT NULL default 0,
`type` varchar(90) NOT NULL default 0, `name` varchar(255) NOT NULL ,
`alias` varchar(255) NOT NULL default 0, `imptotal` int(11) NOT NULL default 0,
`impmade` int(11) NOT NULL default 0, `clicks` int(11) NOT NULL default 0,
`imageurl` varchar(100) NOT NULL default 0, `clickurl` varchar(200) NOT NULL default 0, `date` datetime default NULL, `showBanner` tinyint(1) NOT NULL default 0,
`checked_out` tinyint(1) NOT NULL default 0, `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `editor` varchar(150) default NULL, `custombannercode` varchar(255), `catid` int(10) unsigned NOT NULL default 0, `description` text NOT NULL, `sticky` tinyint(1) unsigned NOT NULL default 0, `ordering` int(11) NOT NULL default 0, `publish_up` datetime NOT NULL default '0000-00-00 00:00:00', `publish_down` datetime NOT NULL default '0000-00-00 00:00:00')

Categories