Jump to content

chris_p

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chris_p's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the reply - I think it almost works, but not quite. Currently the outputted list is: A1 A2 BK8 BK9 BK16 C3 A3 A4 A5 to A16 So it is counting them from A5 to A16 correctly now, but any ideas why BK8 to C3 are in between the rest of the A's? (eg: from A3 to A16) Thanks.
  2. The table is called 'products' and the field is 'products_model'. Thanks.
  3. Cool, thanks for taking the time to write that code, would you possibly be able to let me know whereabouts the SQL you wrote goes in the following statement? I tried putting it in a few different places but couldn't seem to get it right (kept coming back with mySQL errors: $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; Many thanks, Chris
  4. Excellent, thanks - didn't know natsort() exists. Do you know of a way to implement this in a mySQL query at all? For example SELECT * FROM something ORDER BY ???? Thanks
  5. Hi there, I was wondering if anybody could think of an easy way to sort a bunch of strings both alphabetically and numerically - for example this is the intended final sort order of a sample string: A8 A9 A10 A11 A12 However when sorted alphabetically, the outputted result order is: A10 A11 A12 A8 A9 I think a mix of alphabetic and numeric sorting would be what is needed, does anybody have an idea of how to do this? Many thanks, Chris.
×
×
  • 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.