Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Listing by first letter


xtrafile

Recommended Posts

Posted

I'm trying to create a new page based on OSCommerce...

 

So what I added is the code to get the first letter from the headers, so like page?=D

 

Then I have this:

<?php

 

 

// listing all products

$listing_sql = "SELECT cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id $where order by cd.categories_name";

 

$query = mysql_query($listing_sql);

echo "$listing_sql->cd.categories_name";

?>

 

Apparently when I go to the page, it's not listing by first letter.

 

Is something wrong with the way I set up the SQL?

 

Thanks!

Posted
I'm trying to create a new page based on OSCommerce...

 

So what I added is the code to get the first letter from the headers, so like page?=D

 

Then I have this:

<?php

 

 

// listing all products

$listing_sql = "SELECT cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id $where order by cd.categories_name";

 

$query = mysql_query($listing_sql);

echo "$listing_sql->cd.categories_name";

?>

 

Apparently when I go to the page, it's not listing by first letter.

 

Is something wrong with the way I set up the SQL?

 

Thanks!

 

Not listing by first letter? or do you mean listing nothing except errors?

 

That code is just SO wrong it doesn't require comment.

Posted
Hmm ok.

 

So it's bad code.

 

Any suggestions on how I should be doing this with OScommerce easily?

 

Thanks!

 

It's bespoke coding .. there are 3 options

 

1) search for a free contribution that has already been written

 

failing that ..

 

2) If you can, write it yourself

 

failing that ..

 

3) Pay a coder to do it

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...