Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    Redcliffe QLD, Australia
    Posts
    193
    Plugin Contributions
    1

    Help converting OSC SQL code to Zencart

    There have been a number of requests to migrate the Australian FASTWAY Shipping module from OSC MS2 to Zencart, and this is what I am attempting to do. Unfortunately I am stuck on one section.

    If someone could help convert the following OSC MS2 MYSQL code to Zencart compliant MYSQL code, I'm certain the module will work.

    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = tep_db_query($sql); 
    $rec = tep_db_fetch_array($qResult);
    Thanks

  2. #2
    Join Date
    Jul 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Help converting OSC SQL code to Zencart

    Quote Originally Posted by ozetrade View Post
    There have been a number of requests to migrate the Australian FASTWAY Shipping module from OSC MS2 to Zencart, and this is what I am attempting to do. Unfortunately I am stuck on one section.

    If someone could help convert the following OSC MS2 MYSQL code to Zencart compliant MYSQL code, I'm certain the module will work.

    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = tep_db_query($sql); 
    $rec = tep_db_fetch_array($qResult);
    Thanks
    I have the same problem like this, can anyone help me?

    Thanks

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Help converting OSC SQL code to Zencart

    Zen-Venom Get Bitten

  4. #4
    Join Date
    Jul 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Help converting OSC SQL code to Zencart

    Quote Originally Posted by kobra View Post
    Thank you for the reply, i was trying to change the query into:
    PHP Code:
    $sql "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult $db->Execute($sql); 
    $rec $db->Execute($qResult); 
    But still getting errors, could you advise me how should it be?

    Thanks

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Help converting OSC SQL code to Zencart

    But still getting errors
    What error?
    And is this correct?
    From:
    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = tep_db_query($sql); 
    $rec = tep_db_fetch_array($qResult);
    To:
    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = $db->Execute($sql); 
    $rec = $db->Execute($qResult);
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jul 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Help converting OSC SQL code to Zencart

    Quote Originally Posted by kobra View Post
    What error?
    And is this correct?
    From:
    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = tep_db_query($sql); 
    $rec = tep_db_fetch_array($qResult);
    To:
    Code:
    $sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $qResult = $db->Execute($sql); 
    $rec = $db->Execute($qResult);
    I'm not so sure about this, i followed the instructions on the wiki.
    $my_var_query = tep_db_query("query stuff"); >> $my_var = $db->Execute("query stuff");

    $rec = tep_db_fetch_array($qResult); >>$rec = $db->Execute($qResult); (Not sure about this)

 

 

Similar Threads

  1. v151 Old OSC db Backup Need help converting
    By jbginz in forum General Questions
    Replies: 1
    Last Post: 26 Aug 2013, 08:46 PM
  2. v150 Converting osc contribution Post code Validation
    By vkd1980 in forum Contribution-Writing Guidelines
    Replies: 5
    Last Post: 25 Aug 2012, 05:59 AM
  3. Few lines code translation from osc to zencart - please help
    By Backstage in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 14 Jul 2009, 08:49 AM
  4. Converting Header from OSC to Zen
    By msmith1111 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Nov 2008, 04:49 AM
  5. Converting from osC to Zen
    By Therose in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 14 Jan 2008, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg