0

Hello althouh i delete records from the database when i call them on a query they appear. Not the other records of the data just the id i have already deleted. I dont use WHERE because i want to return all records from table. Any guess why the id is returned although it's been deleted?

3
Contributors
7
Replies
33
Views
3 Years
Discussion Span
Last Post by diafol
1

What is the query that you are using to delete the record? Are you not in a transaction that is cancelled and rolled back? Some background info (queries) would not be misplaced here :).

0

I deleted it from the database manually. is it possible to show empty records if the id its a foreign key on another table?

0

I don't think I fully understand your question. Could you give us some more background info? Like the table structure and the queries you are using? :)

0

You don't provide any code nor table structure, so it's very difficult to know what you're doing. Are you sure that the db table that you're deleting from is the same one that you're selecting from?

0

this is the structure

CREATE TABLE IF NOT EXISTS `messages` (
  `msg_id` int(11) NOT NULL AUTO_INCREMENT,
  `message` text CHARACTER SET utf8,
  `description` text CHARACTER SET utf8,
  `uid_fk` int(11) DEFAULT NULL,
  `ip` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created` int(11) DEFAULT '1269249260',
  `uploads` varchar(30) CHARACTER SET latin1 DEFAULT NULL,
  `text` text CHARACTER SET utf8,
  `type` enum('P','A','V','T','E') CHARACTER SET utf8 DEFAULT NULL,
  `believe_count` int(11) DEFAULT '0',
  `review_count` int(11) DEFAULT '0',
  `suggest_count` int(11) DEFAULT '0',
  `network_id` int(11) DEFAULT NULL,
  `views_count` int(11) NOT NULL DEFAULT '0',
  `country_id` int(11) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `venue` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dategig` datetime DEFAULT NULL,
  `fan_count` int(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`msg_id`),
  KEY `uid_fk` (`uid_fk`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=525 ;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
0

We need to see the code. Otherwise we,re just guessing

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.