@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | $connection |
| 816 | 816 | ); |
| 817 | 817 | |
| 818 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 818 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 819 | 819 | { |
| 820 | 820 | if ($returnmode == 1) |
| 821 | 821 | $return_var = smf_db_insert_id($table, $keys[0]) + count($insertRows) - 1; |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | $return_var = array(); |
| 825 | 825 | $count = count($insertRows); |
| 826 | 826 | $start = smf_db_insert_id($table, $keys[0]); |
| 827 | - for ($i = 0; $i < $count; $i++ ) |
|
| 827 | + for ($i = 0; $i < $count; $i++) |
|
| 828 | 828 | $return_var[] = $start + $i; |
| 829 | 829 | } |
| 830 | 830 | return $return_var; |
@@ -763,10 +763,10 @@ discard block |
||
| 763 | 763 | $returning = ''; |
| 764 | 764 | $with_returning = false; |
| 765 | 765 | // lets build the returning string, mysql allow only in normal mode |
| 766 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 766 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 767 | 767 | { |
| 768 | 768 | // we only take the first key |
| 769 | - $returning = ' RETURNING '.$keys[0]; |
|
| 769 | + $returning = ' RETURNING ' . $keys[0]; |
|
| 770 | 770 | $with_returning = true; |
| 771 | 771 | } |
| 772 | 772 | |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
| 798 | 798 | VALUES |
| 799 | 799 | ' . implode(', |
| 800 | - ', $insertRows).$replace.$returning, |
|
| 800 | + ', $insertRows) . $replace . $returning, |
|
| 801 | 801 | array( |
| 802 | 802 | 'security_override' => true, |
| 803 | 803 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | if ($returnmode === 2) |
| 811 | 811 | $return_var = array(); |
| 812 | 812 | |
| 813 | - while($row = $smcFunc['db_fetch_assoc']($request) && $with_returning) |
|
| 813 | + while ($row = $smcFunc['db_fetch_assoc']($request) && $with_returning) |
|
| 814 | 814 | { |
| 815 | 815 | if (is_int($row[$keys[0]])) // try to emulate mysql limitation |
| 816 | 816 | { |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | $connection |
| 758 | 758 | ); |
| 759 | 759 | |
| 760 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 760 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
| 761 | 761 | { |
| 762 | 762 | if ($returnmode == 1) |
| 763 | 763 | $return_var = smf_db_insert_id($table, $keys[0]) + count($insertRows) - 1; |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | $return_var = array(); |
| 767 | 767 | $count = count($insertRows); |
| 768 | 768 | $start = smf_db_insert_id($table, $keys[0]); |
| 769 | - for ($i = 0; $i < $count; $i++ ) |
|
| 769 | + for ($i = 0; $i < $count; $i++) |
|
| 770 | 770 | $return_var[] = $start + $i; |
| 771 | 771 | } |
| 772 | 772 | return $return_var; |