Huh, can't edit post.
This is what creates the array in php:
// Get all categories
$categories_query = tep_db_query("SELECT *
FROM (" . TABLE_CATEGORIES . ")
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " ON ( " . TABLE_CATEGORIES_DESCRIPTION . ".categories_id = " . TABLE_CATEGORIES ...
Here is the php code for this:
// Function to get category with full path
function get_full_cat($cat_id, $CATEGORY_ARR) {
$item_arr = $CATEGORY_ARR[$cat_id];
$cat_name = $item_arr['categories_name'];
while (sizeof($CATEGORY_ARR[$item_arr['parent_id']]) > 0 &&...
Hmm. Maybe it would be easier just to create a temporary table that would consist of the trees in a static form?
Or is there a way to programmatically stop traversing once there are no more categories using sql?
Did my explanation make sense?
The product is at the furthest point in the linear tree, so in the case above, it would be in printers.
The only way to retrieve the names of the parent categories is to look at parent_id for each one as you work backwards until parent_id=0 for the category in...
Ah, good point. Tree is a poor choice of word.
The 'tree' is really just a linear line. A product is put into a category. That category may have a parent category, it may not.
The field should look something like this:
Computers > Peripherals > Printers
The item will only be in the printers...
Alright, Rudy! Now we're getting somewhere.
The names are being filled into that field. However, after further investigation into how the oscommerce system works, it seems that the categories are tree-based.
There is a column in categories called parent_id. If the parent_id is 0, there is no...
I'm not sure what I added was right, as its taking eons to process.
use oscommerce
SELECT manufacturers.manufacturers_name AS manufacturer
, products.products_id AS id
, products_description.products_name AS title
, CONCAT('store/product_info.php?product_id='
...
I don't know how you guys do it. Machines!
There's one thing I forgot to mention. To get to the category descriptions, there are 2 tables.
categories
categories_description
categories.categories_id = categories_description.categories_id
categories_description.categories_name is where the...
Before I go into it, let me state that I've received terrific assistance from this site before.. and it's now the first place I come to when researching query issues!
I'm working on a query that pulls from an OSCommerce database for products. Specifically, there are 4 tables I'm working with...
I think I may need some assistance in getting the TSQL code wrapped up.
I've got a basic select statement working here:
CREATE PROCEDURE v2_Forum_Search
@searchphrases_input varchar(255),
@search_descriptions_toggle bit,
@search_titles_toggle bit,
@forum_ID int...
The ODBC SQL server driver came from the first connection string, Driver={SQL Server}. My guess is, that 'driver' is ODBC?
Also, I've tried to use SQLNCLI, but the provider does not seem to be installed on my host machine. Is that 2005?
I don't have direct access, but I may be able to pull data from sys.sysprocesses.
Someone mentioned to me that this may just be an issue with microsoft's drivers, and classic asp and that it cannot be fixed because it's old technology. I'm having a hard time believing that though.
Every so often, I'll get timeout errors on my site.. and they seem to be fairly random.
They'll occur when a query is being run, or purely just trying to connect to the database.
Here is an example of the error:
ASP Error occurred 6/15/2009 1:05:33 AM in Microsoft OLE DB Provider for ODBC...
I believe you can do this with ODBC.
Excel has the ability to pull data from a database. So essentially, Excel becomes your reporting tool.
Of course, I don't have excel on this machine, but I know I've seen examples of this around the 'net.
One of the difficulties of using SP's with a requirement like this is its lack of array support (grrr!)
I imagine your suggestion of passing the search terms via a comma delimited string is because of that problem, right?
Greets!
Actually, this involves ASP as well, but I didn't want to cross-post to multiple categories. Let me know if I should.
I am getting the following error in my logs when folks search on my site:
ASP Error occurred 6/12/2009 12:25:23 PM in Microsoft OLE DB Provider for ODBC Drivers
Error...
Works like a CHARM! Wish I could give you more than 1 thanks. :D
I really appreciate the help. tek-tips.com always seems to come through with the help I need.
cheers!
Greetings all.
I'm looking for some assistance in a small vbscript problem that has my mind bending into pretzels. :x
Let's say we have a string like this:
"abcdefghijklmnop <br> abcdefghijklmnop <br> abcdefghijk abcdefghijklmnopqr <br> abcdefghijklmnop <br> abcdefghijklmnop <br>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.