mysql - PHP Classes Individualizing Functions -
so i'm trying do...
$sqllib = new mysqli_connect(); $db = $sqllib -> select_db("omg_a_db", true); $tbdata = array("userid" => "int(11) not null", "email" => "varchar(30) collate utf8_unicode_ci", "primary key" => "(userid)"); $tb1 = $db -> select_tb("tab1", $tbdata); $tb2 = $db -> select_tb("tab2", $tbdata); $tb1 -> insert(["userid" => 1, "email" => "test 1"]); $tb2 -> insert(["userid" => 2, "email" => "test 2"]); $tb1 -> query("select * %tb%"); $tb2 -> query("select * %tb%");
i want query inserted both tab1 & tab2 shown accordingly; they're both being inserted tab2. i'm not sure how individualize 2 class functions. how using classes?
Comments
Post a Comment