Zen Cart Logo
Forums / General Questions / how to change this two osc code into zc code?

how to change this two osc code into zc code?

Views: 1,870

Results 1 to 4 of 4
21 Nov 2011, 1:50 AM
#1
sunrise99 avatar

sunrise99

New Zenner

Join Date:
Apr 2008
Posts:
41
Plugin Contributions:
3

how to change this two osc code into zc code?

Dears,
I have one osc module and need change to Zencart code, would you please help asap?

Thanks!

  $lang_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'");
  $lang = tep_db_fetch_array($lang_query);

Thanks & Best Regards,
Sunrise99

21 Nov 2011, 4:12 AM
#3
sunrise99 avatar

sunrise99

New Zenner

Join Date:
Apr 2008
Posts:
41
Plugin Contributions:
3

Re: how to change this two osc code into zc code?

thank you very much!

21 Nov 2011, 4:30 AM
#4
sunrise99 avatar

sunrise99

New Zenner

Join Date:
Apr 2008
Posts:
41
Plugin Contributions:
3

Re: how to change this two osc code into zc code?

but after i replace code:

    $lang_query = $db->Execute("select languages_id, code from ".TABLE_LANGUAGES." where languages_id = '" . (int)$languages_id . "'");

I got the error:
PHP Fatal error: Cannot use object of type queryFactoryResult as array in line.

I based:

Replace code like
$my_var_query = tep_db_query("query stuff");
$my_var = tep_db_fetch_array($my_var_query);
by
$my_var = $db->Execute("query stuff");