osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

How do you print the results of tep_db_query()

This is a discussion on How do you print the results of tep_db_query() within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; If I make this call: $categories_query = tep_db_query(...) When I try to print print "<BR><BR>categories_query = ".$categories_query; I get "categories_query ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-24-2005, 09:04 PM
New Member
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dhobson
Default How do you print the results of tep_db_query()

If I make this call:
$categories_query = tep_db_query(...)
When I try to print
print "<BR><BR>categories_query = ".$categories_query;
I get "categories_query = Resource id #79"

How do I print the contents of $categories_query?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 01-25-2005, 08:11 AM
Active Member
 
Join Date: May 2003
Posts: 148
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
Arpit
Default RE: How do you print the results of tep_db_query()

just fetch the result from the tep_db_query() wher-ever you may choose to do so,

mysql_fetch_array -- Fetch a result row as an associative array, a numeric array, or both
mysql_fetch_assoc -- Fetch a result row as an associative array
mysql_fetch_field -- Get column information from a result and return as an object
mysql_fetch_lengths -- Get the length of each output in a result
mysql_fetch_object -- Fetch a result row as an object
mysql_fetch_row -- Get a result row as an enumerated array
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-25-2005, 03:54 PM
New Member
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dhobson
Default

I only want to see the syntax stored in the variable. I don't actually want to see the result of the query at this time. I want to do it for debugging purposes. Like when the query fails and I can't figure out why.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-27-2005, 08:43 AM
Active Member
 
Join Date: May 2003
Posts: 148
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
Arpit
Default

use the mysql error functions,
http://dev.mysql.com/doc/mysql/en/mysql-error.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How do you actually Print the Printable Catalog zues osCMax v2 Features Discussion 2 11-23-2006 10:43 AM
Fedex Quotes But Won't Print Label cabana osCMax v2 Installation issues 4 09-05-2006 10:51 PM
Please explain tep_db_query() format dhobson osCommerce 2.2 Modification Help 4 01-26-2005 08:03 PM
Need to print shopping cart - how? like a quote mikeyb osCMax v1.7 Discussion 0 01-16-2005 05:40 PM


All times are GMT -8. The time now is 04:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax