What would I query my MySQL server to check if a table has a primary key or not? Something like:
if(mysql_send("SELECT TABLE table HAS PRIMARY KEY") == TRUE) {
// do stuff here
}
SHOW INDEXES FROM TABLE WHERE Key_name = 'PRIMARY'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With