Jump to content

mysql_query not updating


Rhino13

Recommended Posts

Good Day

I was wondering if anyone could help me

mysql does not seem to be working correctly

 

MySQL server version: -- 5.5.24

the raw MySQL statement in question [mysql_query ("UPDATE ".$db_prefix."banner SET `shown`=0");]

any errors that MySQL returns to the client [No ERROR just not updating]

the table structure & column indexes of the relevant tables [--
-- Database: `second`

--

 

-- --------------------------------------------------------

 

--

-- Table structure for table `shc_banner`

--

 

CREATE TABLE IF NOT EXISTS `shc_banner` (

  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `banner_type` char(3) NOT NULL DEFAULT '',

  `cat_id` int(10) NOT NULL,

  `dir_id` char(3) NOT NULL,

  `banner_order` varchar(255) NOT NULL,

  `banner_file` varchar(255) NOT NULL DEFAULT '',

  `banner_title` varchar(255) NOT NULL DEFAULT '',

  `banner_url` varchar(255) NOT NULL DEFAULT '',

  `viewslimit` int(11) NOT NULL COMMENT 'After this amount of views has been reached, the ad will be expired. - 0 To disable',

  `clickslimit` int(11) NOT NULL COMMENT 'After this amount of clicks has been reached, the ad will be expired. - 0 to disable',

  `banner_target` varchar(255) NOT NULL,

  `banner_width` int(4) NOT NULL,

  `banner_height` int(4) NOT NULL,

  `banner_owner` varchar(255) NOT NULL DEFAULT '',

  `banner_dir` varchar(1000) NOT NULL,

  `banner_cat` varchar(1000) NOT NULL,

  `banner_hits` varchar(255) NOT NULL,

  `banner_clicks` varchar(255) NOT NULL,

  `show` int(1) DEFAULT NULL,

  PRIMARY KEY (`idx`),

  KEY `banner_type` (`banner_type`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Random Banner' AUTO_INCREMENT=170 ;

 

--

-- Dumping data for table `shc_banner`

--]

the EXPLAIN output for your query: the query should update the database table but it does not in attached file line 64-67

a clear and concise description of what you want this statement to achieve: That the statment should update my table but it does not

a description of what it's currently doing that's not to your liking: its not updating the table/ not even sowing up in debug mode localhost not live

 

if anybody can help I'm new to this and could not find any solution at all

 

Regards

Rhino

window.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.