This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$table = 'some_table'; | |
$columns = implode(',', array( | |
'title', | |
'description', | |
'etc...', | |
)); | |
$sql = ' | |
INSERT INTO '.$some_table.' (product_id, '.$columns.') | |
SELECT "'.$destId.'", '.$columns.' | |
FROM '.$some_table.' WHERE product_id = "'.$origId->id.'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input pattern="/^(?:(\d+\/[1-9]\d*)|(\d*(?:(\s\d+\/[1-9]\d*)|\.\d+)?))$/"> | |
<!-- | |
(?: => non-capturing group, EITHER | |
(\d+\/[1-9]\d*) => any number of digits followed by a slash then any number of digits not beginning with 0 (fraction) | |
| => OR | |
(\d*(?: => zero or more digits followed by non-capturing group, EITHER | |
( | |
\s => a space | |
\d+ => any number of digits | |
\/ => a slash |
OlderNewer