Jump to content

anthonydamasco

Members
  • Posts

    92
  • Joined

  • Last visited

    Never

About anthonydamasco

  • Birthday 05/17/2006

Contact Methods

  • Website URL
    http://www.anthonydamasco.net

Profile Information

  • Gender
    Male

anthonydamasco's Achievements

Member

Member (2/5)

0

Reputation

  1. what does $prevCat = why is it blank? I get the logic you are suggesting, I just don't know how to get fill in the if (subcat4 = prevcat) info wait, i get it, let me try it out
  2. Hola I have a while loop issue that is driving me crazy - I have a database with the columns | Category | Subcat 1 | Subcat 2 | Subcat 3 | Subcat 4 | Productname under "sub cat 4" I have this data: Red Star Red Star Red Star Red Star Red Star BioSpringer BioSpringer BioSpringer BioSpringer AEB Yeast AEB Yeast AEB Yeast AEB Yeast I need to display products that are under "subcat 4" only mentioning "subcat 4" once then displaying all products below it, when the subcat 4 changes to the next result i needs to change. Example below. Red Star product product product product BioSpringer product product product product AEB Yeast product product product product product My code $sql3 = "select product_id, product_name, subcategory_4 from products where category = '$category' and subcategory_1 = '$subcategory_1' and subcategory_2 = '$subcategory_2' and subcategory_3 = '$subcategory_3'"; $query3 = mysql_query($sql3) or print "<font>insert error: " . mysql_error() . ". SQL was $sql"; $num_rows_top3 = mysql_num_rows($query3); if ($num_rows_top3 !== 0 ) { $sql4 = "select distinct subcategory_4 from products where category = '$category' and subcategory_1 = '$subcategory_1' and subcategory_2 = '$subcategory_2' and subcategory_3 = '$subcategory_3'"; $query4 = mysql_query($sql4) or print "<font>insert error: " . mysql_error() . ". SQL was $sql"; $m = 0; $q = 0; while (list($subcategory_4_loop)=mysql_fetch_row($query4)) { $m++; if ($m == 1) { echo "<br /><div class=\"product_nav_right_header padding_bottom_15\">$subcategory_4_loop</div>"; } #List all the products within this statement. while (list($product_id, $product_name, $subcategory_4)=mysql_fetch_row($query3)) { if ($subcategory_4 !== $subcategory_4_loop) { $q++; if ($q == 1) { echo "<br /><div class=\"product_nav_right_header padding_bottom_15\">$subcategory_4</div>"; } } echo "<a href=\"product_detail2.php?product_id=$product_id&id=$k\" class=\"right_side_link\">$product_name</a><br>"; } #end while loop What my code is doing is: Red Star product product product product BioSpringer product product product product product product It's not listing any subcategory after the first 2 - I know it's because of my counter - but I can't think of any other way to do it. Any help would be great
  3. You guys rock! Thanks - worked, headache is finally going away
  4. the email server might just be REALLY slow also
  5. call your host and raise hell, or get a new host, uploading in pieces is just going to get you corrupt files. Or find another host and just use them as file storage.
  6. make sure that the server is that you are using is setup for server email.
  7. Alright Simple problem. I am storing measurements in a database (feet/inches) so here is the issue. database field "measure" = 2' 9" $dem = $my_row['measure']; echo $dem; Result: 2' 9 how do i echo the string with the quotes at the end?
  8. Alright, I'm trying this method, how do i post this to create the "$colours" variable
  9. im getting an error when trying to use that code Parse error: syntax error, unexpected '{' on this line: if ( isset($_POST['colors']) && is_array($_POST['colors']) {
  10. how would i set up the array to use this? sorry, im still a little junior
  11. thats, but that doesnt seem to work either, http://pattersonflynnandmartin.com/advanced_search.php when you search with any color checked, it seems to ignore the "AND collection like '$collection'
  12. Hey, Here is my query "SELECT * FROM products WHERE collection LIKE '%$collection%' AND construction LIKE '%$construction%' AND match1 LIKE '%$match1%' AND wheremade_e LIKE '%$wm_en%' AND pattern LIKE '%$keyword%' AND sku LIKE '%$keyword%' AND color_e LIKE '%$Beige%' OR '%$colorall%' OR '%$Black%' OR '%$Blue%' OR '%$Brown%' OR '%$Gold%' OR '%$Green%' OR '%$Grey%' OR '%$Neutral%' OR '%$Red%' OR '%$Rust%' OR '%$Seafoam%' OR '%$White%' AND fiber LIKE '%$fiberall%' OR '$Wool' OR '$Silk_and_Wool' OR '$Sisal' OR '$Cotton' OR '$Mixed' LIMIT $eu, $limit" the posting page has check boxes for each color, the only color that is actually being called is "beige" if i check any other color check box i get no results. Obviously there is something wrong with my query. any suggestions?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.