PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function test($a_set_sql, $a_where_sql){ $set_sql = sizeof($a_set_sql) ? 'SET ' . implode(',', $a_set_sql) : ''; $where_sql = sizeof($a_where_sql) ? ' WHERE (' . implode(') AND (', $a_where_sql) . ')' : ''; echo 'UPDATE game_chat_users '.$set_sql.$where_sql; } $username = 'Denis'; $session_id = 5; test(['"read"=1'],['session_id = '.$session_id , 'username = \''.$username.'']);
Show:  
Copy Clear