Snowman Posted September 22, 2002 Share Posted September 22, 2002 Whats the osCommerce tep function equivalent to mysql_fetch_row($result); I have a form in a mod that im working on that posts to a table and an id is assigned to each posting, however i want to echo that id on a success page.... the script im working from has: $query = "SELECT id FROM problems WHERE name = '$name' AND problem = '$problem';"; $result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error()); list($ticketno) = mysql_fetch_row($result); and i have so far changed it to: $query = "SELECT id FROM problems WHERE name = '$name' AND problem = '$problem';"; $result = tep_db_query($query); list($ticketno) = tep_fetch_row($result); everything works except the last line: list($ticketno) = tep_fetch_row($result); what do i need to change this line to??? Link to comment Share on other sites More sharing options...
Mark Evans Posted September 22, 2002 Share Posted September 22, 2002 what do i need to change this line to??? I would use list($ticketno) = tep_db_fetch_array($result); As there is no wrapper for mysql_fetch_row Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
Snowman Posted September 22, 2002 Author Share Posted September 22, 2002 hmm thats what i thought but i couldnt get it to work properly...oh well ill adjust things to suit Thanks Link to comment Share on other sites More sharing options...
Mark Evans Posted September 22, 2002 Share Posted September 22, 2002 hmm thats what i thought but i couldnt get it to work properly...oh well ill adjust things to suit If not add this to includes/functions/database.php function tep_db_fetch_row($db_query) { return mysql_fetch_row($db_query); } Then you can replace tep_db_fetch_array with tep_db_fetch_row :) Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.