• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SORTED] DB results with unknown field names

#1
[eluser]meigwilym[/eluser]
I've got a table with columns for each language (en and cy).

I get the data like this

Code:
function getdata($lang){

  $sql = "SELECT title_".$lang.", text_".$lang." FROM table ; ";

  $query = $this->db->query($sql);

  foreach ($query->result() as $row){

# etc etc

but then I'm stuck as I either need to call $row->text_cy or $row->text-en.

Thanks,

Mei


Messages In This Thread
[SORTED] DB results with unknown field names - by El Forum - 09-24-2008, 03:05 AM
[SORTED] DB results with unknown field names - by El Forum - 09-24-2008, 03:14 AM
[SORTED] DB results with unknown field names - by El Forum - 09-24-2008, 03:16 AM
[SORTED] DB results with unknown field names - by El Forum - 09-24-2008, 05:14 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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