Forum Moderators: coopster

Message Too Old, No Replies

PHP Not sending to database

nothing appears to have changed, but diary is no longer posting

         

skeddy

5:49 pm on Feb 6, 2005 (gmt 0)

10+ Year Member



I've run across a problem with my blogging system, and I'm not sure what to do.

The aim of the script is tro write a new diary entry, and then add it to the database.

For some reason, since the 2nd Feb, it's no longer writing the data into the data base.

I've not changed the main input form, or the PHP scrip to send it to the database. I've double checked this with a text version of the site that I use, and all aspects of the configeration file work perfectly - users can post new messages, and if a news item is read, it's count goes up by one.

It;s only my 'news' table that seems to be effected.

I have run the following commands via SQL - Check, Repair, Analyse, Optimise and it's not reporting any errors.

There are 92 entries in the news table, and the next ID will be 127.

The table format is this:


--
-- Table structure for table `news`
--

CREATE TABLE `news` (
`id` tinyint(4) NOT NULL auto_increment,
`mood` text,
`title` text NOT NULL,
`music` text,
`date` varchar(50) default NULL,
`news` text NOT NULL,
`date2` text,
`hits` tinyint(50) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=127 ;

If I rename this table to news_old and create a new table, it allows me to add new items to the news. But I don't want to lose all my previous data.

Sorry for the long post, but it's driving me mad, as i've not changed any part of these three bits of code.

dmmh

7:01 pm on Feb 6, 2005 (gmt 0)

10+ Year Member



I think we need to see some code, I dont think its an MySQL error, probably your server config changed and messed up your code for the page. Its the most likely scenario to me anyway

coopster

7:43 pm on Feb 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The problem is that the maximum value for an UNSIGNED TINYINT [dev.mysql.com] is 127. You need to ALTER that column to accomodate more entries.

dmmh

4:59 am on Feb 7, 2005 (gmt 0)

10+ Year Member



Ive been staring at that for a minute then discarded it as the culprit, I feel like a moron :)

coopster

12:11 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



No need for feeling that way, it often takes another set of eyes. Trust me, we've all been down that road ;)