|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-11 14:51 UTC] georg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 07:00:02 2025 UTC |
Description: ------------ MYSQLI_UNIQUE_KEY_FLAG aren't being indicated for columns that have UNIQUE indexes. Reproduce code: --------------- mysqli_query($db->connection, 'CREATE TABLE phptest_fk (a VARCHAR(5),' . ' UNIQUE (a))'); $r = mysqli_query($db->connection, 'SELECT a FROM phptest_fk'); $tmp = mysqli_fetch_field($r); echo 'MYSQLI_UNIQUE_KEY_FLAG? '; if ($tmp->flags & MYSQLI_UNIQUE_KEY_FLAG) { echo "yes\n"; } else { echo "no\n"; } mysqli_query($db->connection, 'DROP TABLE phptest_fk'); Expected result: ---------------- MYSQLI_UNIQUE_KEY_FLAG? yes Actual result: -------------- MYSQLI_UNIQUE_KEY_FLAG? no