• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PostgreSQL function _list_columns

i had a problem with this function
i was programing a site using mysql and everything was OK
but when i change to postgresql, scaffolding had a problem
because function <b>_list_columns</b> in mysql list all the
columns names in order to creation
<b>SELECT columns FROM TABLE</>
in postgresql
<b>SELECT column_name FROM information_schema.columns WHERE tablename='TABLE'</b>
this code return all the columns of TABLE, but first it list the number types columns
and later the strings columns, i had a table with 2 columns oh each type
i solve this adding
<b>ORDER BY ordinal_position</b>
at postgresql statement

i'd like this count in CI 1.5.5

Thanks sergitin, I had the same problem with CI 1.7 and your solution solve it.
It should be great to be added in CI.
Curiously, I also have to add this line before the query :
$table = ereg_replace('"',"",$table);

[eluser]Chris Bandy[/eluser]

The text replacement you required is to work around bug #5865

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.