Código PHP:
mysqli_set_charset($cnx=mysqli_connect('localhost','root',null,'pruebas'),'utf8');
var_dump($cnx);
var_dump("UPDATE $table SET ".implode(',',$u)." WHERE "."id_".$singular[$DDBB]."=".$id);
mysqli_query($cnx."UPDATE $table SET ".implode(',',$u)." WHERE "."id_".$singular[$DDBB]."=".$id);
Cita:
object(mysqli)#2 (19) { ["affected_rows"]=> int(0) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(0) ["host_info"]=> string(20) "localhost via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.1.38-MariaDB" ["server_version"]=> int(50505) ["stat"]=> string(135) "Uptime: 77391 Threads: 1 Questions: 3458 Slow queries: 0 Opens: 27 Flush tables: 1 Open tables: 21 Queries per second avg: 0.044" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(805) ["warning_count"]=> int(0) } string(11) "profesional" object(mysqli)#3 (19) { ["affected_rows"]=> int(0) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(0) ["host_info"]=> string(20) "localhost via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.1.38-MariaDB" ["server_version"]=> int(50505) ["stat"]=> string(135) "Uptime: 77391 Threads: 2 Questions: 3459 Slow queries: 0 Opens: 27 Flush tables: 1 Open tables: 21 Queries per second avg: 0.044" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(806) ["warning_count"]=> int(0) }
string(11) "profesional" string(116) "UPDATE profesionales SET nombre='Andrea5',apellidos='Gómez',profesional='Ps ic.' WHERE id_profesional=9"
Recoverable fatal error: Object of class mysqli could not be converted to string in C:\xampp\htdocs\controller\controller.php on line 21
string(11) "profesional" string(116) "UPDATE profesionales SET nombre='Andrea5',apellidos='Gómez',profesional='Ps ic.' WHERE id_profesional=9"
Recoverable fatal error: Object of class mysqli could not be converted to string in C:\xampp\htdocs\controller\controller.php on line 21