Page 2 of 2

Re: php edit data page issue

Posted: Tue Jun 30, 2015 1:58 pm
by Celauran
ianhaney wrote:The only issue is the renewal data is being duplicated 3 times
So you're getting 9 rows per user?

Re: php edit data page issue

Posted: Tue Jun 30, 2015 2:14 pm
by Celauran
Yep. You're inserting on line 88, then again on 104. You've already captured the return value in $result, so just compare against that.

Re: php edit data page issue

Posted: Tue Jun 30, 2015 2:15 pm
by Celauran
Unrelated, but I've also noticed you have three indices on the same column.

Re: php edit data page issue

Posted: Tue Jun 30, 2015 2:26 pm
by Celauran
No, I meant this:

Code: Select all

CREATE TABLE IF NOT EXISTS `renewal` (
  `renewal_id` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `renewal_date` date NOT NULL,
  `date_notified` datetime DEFAULT NULL,
  PRIMARY KEY (`renewal_id`),
  KEY `renewal_id` (`renewal_id`),
  KEY `renewal_id_2` (`renewal_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=217 ;
You've got a primary key and two additional keys all defined on the same column. No need for that.

Re: php edit data page issue

Posted: Tue Jun 30, 2015 2:40 pm
by Celauran
You're looking at the columns themselves and not the indices defined on the table. Expand 'Indexes' just below that to see what I'm talking about.