Exemplo n.º 1
0
 function select_data($field_select, $table_condition)
 {
     @connect_mysql::set_host_user_pass_dbname();
     $strSQL = "SELECT {$field_select} FROM {$table_condition}";
     $result = mysql_query($strSQL);
     /*$num=mysql_num_rows($result);
     		echo"num $num";*/
     return $result;
 }
Exemplo n.º 2
0
 function delete_data($table, $condition)
 {
     //echo"$table<br>";
     //echo"$condition<br>";
     connect_mysql::set_host_user_pass_dbname();
     $strSQL = "DELETE FROM {$table} WHERE {$condition}";
     $result = mysql_query($strSQL);
     if (!$result) {
         echo "error" . mysql_error();
     } else {
         //echo"ok for result delete";
     }
 }