php - More Details for MySQL's errorno:150 -
i'm using php's pdo driver/api/library create tables in mysql. when mysql can't create table due foreign key constraint problem, returns next error
can't create table 'dbname.table_name' (errno: 150)
is there anyway have mysql tell (or automatically lookup/analyze) why couldn't create table. example, if effort create table 10 foreign keys, , 1 key invalid, there way have mysql tell 1 problematic key? or need rely on human intelligence , debugging figure out yourself?
the closest i've been able come on using perror command
it won't give fine grained details, give plain english language explanation of error code.
$ perror 150 mysql error code 150: foreign key constraint incorrectly formed $ perror 151 mysql error code 151: cannot add together kid row php mysql
No comments:
Post a Comment