@@ -254,8 +254,8 @@ discard block |
||
254 | 254 | |
255 | 255 | case 'datetime': |
256 | 256 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1) |
257 | - return 'str_to_date('. |
|
258 | - sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]). |
|
257 | + return 'str_to_date(' . |
|
258 | + sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) . |
|
259 | 259 | ',\'%Y-%m-%d %h:%i:%s\')'; |
260 | 260 | else |
261 | 261 | smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | { |
840 | 840 | $count = count($insertRows); |
841 | 841 | $ai = 0; |
842 | - for($i = 0; $i < $count; $i++) |
|
842 | + for ($i = 0; $i < $count; $i++) |
|
843 | 843 | { |
844 | 844 | $old_id = $smcFunc['db_insert_id'](); |
845 | 845 | |
@@ -865,13 +865,13 @@ discard block |
||
865 | 865 | $count2 = count($indexed_columns); |
866 | 866 | for ($x = 0; $x < $count2; $x++) |
867 | 867 | { |
868 | - $where_string += key($indexed_columns[$x]) . ' = '. $insertRows[$i][$x]; |
|
868 | + $where_string += key($indexed_columns[$x]) . ' = ' . $insertRows[$i][$x]; |
|
869 | 869 | if (($x + 1) < $count2) |
870 | 870 | $where_string += ' AND '; |
871 | 871 | } |
872 | 872 | |
873 | - $request = $smcFunc['db_query']('',' |
|
874 | - SELECT `'. $keys[0] . '` FROM ' . $table .' |
|
873 | + $request = $smcFunc['db_query']('', ' |
|
874 | + SELECT `'. $keys[0] . '` FROM ' . $table . ' |
|
875 | 875 | WHERE ' . $where_string . ' LIMIT 1', |
876 | 876 | array() |
877 | 877 | ); |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | $return_var = array(); |
901 | 901 | $count = count($insertRows); |
902 | 902 | $start = smf_db_insert_id($table, $keys[0]); |
903 | - for ($i = 0; $i < $count; $i++ ) |
|
903 | + for ($i = 0; $i < $count; $i++) |
|
904 | 904 | $return_var[] = $start + $i; |
905 | 905 | } |
906 | 906 | return $return_var; |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | mysqli_stmt_bind_param($mysql_error_data_prep, 'iissssssi', |
1031 | 1031 | $error_array[0], $error_array[1], $error_array[2], $error_array[3], $error_array[4], $error_array[5], $error_array[6], |
1032 | 1032 | $error_array[7], $error_array[8]); |
1033 | - mysqli_stmt_execute ($mysql_error_data_prep); |
|
1033 | + mysqli_stmt_execute($mysql_error_data_prep); |
|
1034 | 1034 | } |
1035 | 1035 | |
1036 | 1036 | ?> |
1037 | 1037 | \ No newline at end of file |