how to know the database field lenght and default value
how to know the database field lenght and default value
Hi
I'd like to automatically define the .def value and the width for inputs.
I can get some of these informations using (or other methods)
$res=mysqli_query($db, "DESCRIBE $Tbl")
Is there a way to (option as 'UseDbSet' for example) that should simplify the job
Regards
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'm sorry - I don't really understand your question. Are you looking to read values from a database and use them in the initialisation of your DataTable / Editor? If so, then yes you can do that, but it isn't something that we provide out of the box. The best way is to read the information from the database and dynamically generate the Javascript needed (or JSON if you prefer to load the config async).
Allan
Yes this is what I am looking for.
As we connect to the database, it should be interresting to get the def values and other informations (like field name, type, length, ...) and map directly these informations for editor (and or datatable) not ?
Once upon a time I did something like that, allowing edit table with no other parameters than table name (and db set of course), but in php only (not very pretty interface...).
Thanks for answer