14,974
edits
mNo edit summary |
|||
| Line 20: | Line 20: | ||
ADD UNIQUE KEY `id` (`id`) USING BTREE; | ADD UNIQUE KEY `id` (`id`) USING BTREE; | ||
SELECT HEX(id), id, notes FROM articles; | SELECT HEX(`id`), `id`, `notes` FROM `articles`; | ||
</pre> | </pre> | ||
| Line 45: | Line 45: | ||
</table> | </table> | ||
If the column {{kbd | key=`id`}} only allowed integer, you can use the following sql query to find the records contains BOM: | |||
<pre> | |||
SELECT * | |||
FROM `articles` | |||
WHERE HEX(`id`) REGEXP '[^0-9]+' | |||
</pre> | |||
=== PHP way === | === PHP way === | ||