Welcome Guest, Not a member yet? Register   Sign In
[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



Theme © iAndrew 2016 - Forum software by © MyBB