I want to check whether a field in a table has been defined with NOT NULL.
So Lets say I have the following code to create an sql query:
$sql = "CREATE TABLE `testdb`.`test` (`a` INT NULL, `b` INT NOT NULL DEFAULT \'2\');";
Now I want to write some code in php that can query the table as to whether or not field b is defined as NOT NULL or not. I suppose the more general question here is how to query a table for the properties of its fields.