//Alter tables $db->query('ALTER TABLE TB_USERS ADD CONSTRAINT INTEG_13 PRIMARY KEY (ID);'); //You can insert data in table with two methods... //Method 1 $db->query("INSERT INTO TB_USERS (ID, NAME, ADDRESS, COMPANY) VALUES (1, 'Evert Ulises', 'Tetameche #3035 Culiacan Sinaloa', 'Freelancer');"); //Method 2 table new data [field=data] $getInsertedId = $db->insert("TB_USERS", "ID=2, NAME='German Soto', 'Tetameche #3035 Culiacan Sin. Mexico', 'Freelancer'"); //If you need get rows from query... $rs = $db->query("SELECT * FROM TB_USERS"); foreach ($rs as $row) { $tmp_id = $row["ID"]; $tmp_name = $row["NAME"]; echo "The user ({$tmp_id}) is named: {$tmp_name}<br>"; } //Once that you have execute any query, you can get total rows. echo "Total rows: " . $db->rowCount() . "<br>"; $rs = null; //You can delete rows from table with two methods... //Method 1 $db->query("DELETE FROM TB_USERS WHERE ID=1;"); //Method 2 table condition without "WHERE" $getAffectedRows = $db->delete("TB_USERS", "ID=1"); //You can update rows from table with two methods... //Method 1 $db->query("UPDATE TB_USERS SET COMPANY='Freelancer MX' WHERE ID=2;"); //Method 2 table set new data [field=data] condition without "WHERE" $getAffectedRows = $db->delete("TB_USERS", "NAME='wArLeY996',COMPANY='Freelancer MX'", "ID=2"); //If you need get columns name, you can do it... $column_array = $db->columns("TB_USERS"); if ($column_array != false) { foreach ($column_array as $column) {