close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Problem records being returned

Thread began 6/11/2016 1:54 am by markdoyle87077 | Last modified 7/07/2016 7:22 pm by markdoyle87077 | 5234 views | 14 replies

markdoyle87077

Problem records being returned

I have set up my search page and when I search for 0070 8 foil balloons are returned. The recordset I am using for this is:

php:
<?php

$rs_foil 
= new WA_MySQLi_RS("rs_foil",$dmbc_database,0);
$rs_foil->setQuery("SELECT products.id, products.itemnumber, products.description, products.categories, products.category_type, products.status, products.type, products.productdescription, products.typename, products.selling_quantity, products.price, products.image, products.imagelarge, products.volumediscount, products.supplier, products.supplierlogo, products.stock, products.onorder, products.packed, products.customer_back_orders, products.pending_online_orders, products.visible, products.product_arrival_date, special_prices.price AS special_price FROM products LEFT OUTER JOIN special_prices ON products.itemnumber = special_prices.itemnumber AND special_prices.userdetails_id = ? WHERE visible = 1 AND category_type='Foil Balloons' AND (products.itemnumber LIKE ? OR products.supplieritemnumber LIKE ? OR description LIKE ? OR keywords LIKE ? OR supplier LIKE ?) ORDER BY description ASC");
$rs_foil->bindParam("i""".($rs_customer->getColumnVal("id"))  ."""-1"); //colname
$rs_foil->bindParam("c""".(isset($_SESSION['keywords'])?$_SESSION['keywords']:"")  ."""-1"); //colname1
$rs_foil->bindParam("c""".(isset($_SESSION['keywords'])?$_SESSION['keywords']:"")  ."""-1"); //colname2
$rs_foil->bindParam("c""".(isset($_SESSION['keywords'])?$_SESSION['keywords']:"")  ."""-1"); //colname3
$rs_foil->bindParam("c""".(isset($_SESSION['keywords'])?$_SESSION['keywords']:"")  ."""-1"); //colname4
$rs_foil->bindParam("c""".(isset($_SESSION['keywords'])?$_SESSION['keywords']:"")  ."""-1"); //colname5
$rs_foil->execute();
?>


I then have an option to sort these by size/type using the following URL:

http://www.dmballooncompany.com/php/gb/registered/products/category_search.php?category=0070&category_type=Foil Balloons

The problem is no products are returned. The recordset I am using for this is below. It is modified version of the recordset at the top of the page and I am cannot seem to work out why no products are returned. What is even more strange is that if I search for love 82 products are returned and then when I click the URL to sort by size/type 82 products are shown.

php:
<?php

$rs_products 
= new WA_MySQLi_RS("rs_products",$dmbc_database,0);
$rs_products->setQuery("SELECT products.id, products.itemnumber, products.description, products.categories, products.category_type, products.status, products.type, products.productdescription, products.typename, products.selling_quantity, products.price, products.image, products.imagelarge, products.volumediscount, products.supplier, products.supplierlogo, products.stock, products.onorder, products.packed, products.customer_back_orders, products.pending_online_orders, products.visible, products.product_arrival_date, special_prices.price AS special_price FROM products LEFT OUTER JOIN special_prices ON products.itemnumber = special_prices.itemnumber AND special_prices.userdetails_id = ? WHERE visible = 1 AND category_type=? AND (products.itemnumber LIKE ? OR products.supplieritemnumber LIKE ? OR description LIKE ? OR keywords LIKE ? OR supplier LIKE ?) ORDER BY type, description ASC");
$rs_products->bindParam("i""".($rs_customer->getColumnVal("id"))  ."""-1"); //colname
$rs_products->bindParam("s""".(isset($_GET['category_type'])?$_GET['category_type']:"")  ."""-1"); //colname1
$rs_products->bindParam("c""".(isset($_GET['category'])?$_GET['category']:"")  ."""-1"); //colname2
$rs_products->bindParam("c""".(isset($_GET['category'])?$_GET['category']:"")  ."""-1"); //colname3
$rs_products->bindParam("c""".(isset($_GET['category'])?$_GET['category']:"")  ."""-1"); //colname4
$rs_products->bindParam("c""".(isset($_GET['category'])?$_GET['category']:"")  ."""-1"); //colname5
$rs_products->bindParam("c""".(isset($_GET['category'])?$_GET['category']:"")  ."""-1"); //colname6
$rs_products->execute();
?>


Any ideas?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...