How can I using KohanaPHP framework and database module get mysql table structure?
I’ve tried this:
$query = DB::query(NULL, 'DESCRIBE table_name');
$result = $query->execute();
But it only returns number of columns in table, and foreach loop failed.
Is there any other way to get table structure or how can I update code above to works properly?
Try this:
EDIT
You need to specify the type of query of DB::query() will just return the number of affected rows.
This will give you the result you expect.