\BHB::$db->query()
<?php CREATE TABLE IF NOT EXISTS `bhb_cities` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, `idcont` int(2) DEFAULT NULL, `idstate` int(11) DEFAULT NULL, `idregion` int(11) DEFAULT NULL, `city` varchar(255) DEFAULT NULL, `ct` varchar(5) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ; -- -- Dump dei dati per la tabella `bhb_cities` -- INSERT INTO `bhb_cities` (`id`, `idcont`, `idstate`, `idregion`, `city`, `ct`) VALUES (1, 1, 1, 1, 'Munich', ''), (2, 1, 1, 1, 'Augsburg', ''), (3, 1, 1, 2, 'Leipzig', ''), (4, 1, 1, 2, 'Dresden', ''), (5, 1, 2, 3, 'Luzern', ''), (6, 1, 2, 3, 'Brunnen', ''), (7, 1, 2, 4, 'Appenzell', ''), (8, 1, 2, 4, 'Einsiedeln', ''), (9, 2, 3, 5, 'Charlottetown', ''), (10, 2, 3, 5, 'New Glasgow', ''), (11, 2, 3, 6, 'Salt Lake City', ''), (12, 2, 3, 6, 'White Horse', ''), (13, 2, 4, 7, 'L.A.', ''), (14, 2, 4, 7, 'San Francisco', ''), (15, 2, 4, 8, 'Miami', ''), (16, 2, 4, 8, 'Tampa', ''), (17, 3, 5, 9, 'Guwahati', ''), (18, 3, 5, 9, 'Agartala', ''), (19, 3, 5, 10, 'Thiruvananthapuram', ''), (20, 3, 5, 10, 'Bangalore', ''), (21, 3, 6, 11, 'Beijing', ''), (22, 3, 6, 11, 'Tianjin', ''), (23, 3, 6, 12, 'Guilin', ''), (24, 3, 6, 12, 'Hong Kong', ''); $res = \BHB::$db->query( \BHB::$db->db("basilar"), //\BHB::$db->db() means basilar. $sql = "SELECT, UPDATE, DELETE", array //will foce to array if you exept an array. ); $resCity = \BHB::$db->selectRow("basilar","city","bhb_cities","id","5"); //means 'SELECT city FROM bhb_cities WHERE id = 5' $resRow = \BHB::$db->selectRow("basilar",array("idcont","city"),"bhb_cities","id","5"); print $resRow["idcont"].", ".$resRow["idstate"].", ".$resRow["city"]."<br />"; //to have more using selectRow $resRow = \BHB::$db->selectRow( "basilar", array( //"basilar,continent,bhb_continents,id,this" => "idcont", ",continent,bhb_continents,id,this" => "idcont", ",state,bhb_states,id,this" => "idstate", "city" ), "bhb_cities", "id", $res["select_four"] ); print $resRow["idcont"].", ".$resRow["idstate"].", ".$resRow["city"]."<br />"; $resRowCity = \BHB::$db->selectRow("basilar", "city", "bhb_cities", ": id='".mysql_real_escape_string(5)."' AND idcont='".mysql_real_escape_string(1)."'" ); print "<br />".$resRowCity."<br />"