Closed JPPhoto closed 2 years ago
Aah, I've hit this bug a couple of times before (I noticed this especially with only two columns), thanks for pinpointing where this is!
I'll have to find the time to take a look at changing the code, but that might take some time.
Feel free to send a PR in the meanwhile!
See #49 for my suggested fix.
Merged! Thanks a lot!
The following generated code for a foreign key doesn't display correctly, especially when the table (
task_types
) has only an ID and one other column:The row returned by
mysqli_query
hasID
as its first column and the resultingarray_pop
removesName
entirely, leaving justID
in the dropdown.The same issue happens for other queries in this generated code -
ID
is the first column returned bymysqli_fetch_array
and the last column always gets stripped out.A generalized solution would be something like the following: