delete and update queries overheading tables

From: Date: Mon, 21 Jan 2002 05:02:47 +0000
Subject: delete and update queries overheading tables
Groups: php.db 
Request: Send a blank email to php-db+get-16018@lists.php.net to get a copy of this message
hello! i'm with problem when i delete something from mysql, the table overhead a few bytes i'm running a sql query from a php page: if($DEl && $cid && $sid && $did) { $d0->query("SELECT id FROM crd_favorites WHERE did='$did' AND uid='$uid'"); if($d0->num_rows()<1) { $favMessage="Cartao #$did nao estao no seu favoritos."; } else { $d0->query("DELETE FROM crd_favorites WHERE uid='$uid' AND did='$did'"); $favMessage="Cartao #$did deletado do seu favoritos."; } } my table structure: CREATE TABLE crd_favorites ( id int(11) NOT NULL auto_increment, uid int(11) NOT NULL default '0', cid int(11) NOT NULL default '0', sid int(11) NOT NULL default '0', did int(11) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM COMMENT='[Cartoes] Relacionamento entre cat, sub e dat'; and mysql my function query in mysql class: function query($query="") { $action = @mysql_query($query, $this->DBCONN); if(!$action) { $this->error("query;#01;[$query]"); return 0; } $this->DBQRID=$action; return 1; } my mysqld: [root@dev ton]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2165 to server version: 3.23.47-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> status -------------- mysql Ver 11.15 Distrib 3.23.47, for pc-linux-gnu (i686) Connection id: 2165 Current database: Current user: root@localhost Current pager: stdout Using outfile: '' Server version: 3.23.47-log Protocol version: 10 Connection: Localhost via UNIX socket Client characterset: latin1 Server characterset: latin1 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 36 min 0 sec Threads: 1 Questions: 13068 Slow queries: 0 Opens: 27 Flush tables: 1 Open tables: 19 Queries per second avg: 6.050 -------------- mysql> if hope someone can help me because i'm with serius problem with delete and updates queries this commands are overheading my tables... ;( thanks.. Everton

« previous php.db (#16018) next »