Jump to content

mihail

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mihail's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Security is a complex issue. http://shiflett.org might be of interest.
  2. It is difficult to get the headers right. Try this class http://www.phpclasses.org/browse/package/9.html . It is very simple to use and works perfectly.
  3. $roll = $_SESSION ['roll"']; $rollExcel = $_SESSION['rollExcel']; $excel = "SELECT rollN, tyU FROM excel WHERE roll = '$roll' AND rollExcel = '$rollExcel'";
  4. To quote myself: "Now I need to pull out all distinct articles from all subcategories of parent category" So 1 article can be in one or more subcategorias of a parent cat., but it should be displayed only once. One more exampe: - if I click Category 1, I need to get all distinct article from Category 1, Subcategory 1.1 and subcategory 1.2. - if I click Subcatgory 1.1 I need to get only articles fron that category Also any subcategory can have subcategories etc, so I think this should be a recursive function.
  5. Hi guys, here is my newest problem: I have 3 tables - categories cat_id parent name - articles art_id title - articles_to_categories id cat_id art_id with this structure I have for example: category 1 (cat_id =1, parent=0) - subcategory 1.1 (cat_id =2, parent=1) - subcategory 1.2 (cat_id =3, parent=1) and article with art_id 1 in both subcategories, so in articles_to_categories I have 2 records - id=1, cat_id=2, art_id=1 - id=1, cat_id=3, art_id=1 Now I need to pull out all distinct articles from all subcategories of parent category. For example, I need to pull out all articles from category 1 wich means all distinct articles from subcategory 1.1 and subcategory 1.2. Somebody please help mi with that. Thanks in advance!
  6. Well, yeah, that is basic knowledge. But thanks anyway. Now you have to paginate results. The real problem is that results from one category can be listed on more than one page and the name/id of that category must be displayed on all these pages.
  7. Hi guys, I have a pagination problem (yes, I have searched the forums for pagination etc. Very Happy ). Here is a scenario: In my database I have a table PRODUCTS with around 1000 records. Each product belongs to a category; there are 18 categories. table structure: product_id category_id product_name I want to paginate results (for example let us say 5/page) gruped by categories. So the output could be something like this: page 1 category chairs chair 1 chair 2 chair 3 category lights light 1 light 2 page 2 category lights light 3 light 4 light 5 light 6 category beds bed 1 page 3 category beds bed 2 bed 3 category .... Could you please help me with that? Thanks
  8. Hi guys, Please help me with this one. How would I list 15 minute intervals starting with $start_time and ending with $end_time (24 hour format)? Example: $start_time = "11:45"; $end_time = "13:15"; Listed intervals: 11:45 12:00 12:15 12:30 12:45 13:00 13:15 Also, if start_time and end_time are 00:00, all 15 minute intervals of the day should be listed. Thanks in advance!
  9. Aaaauch! That is mind blowing, guys!!! But it works! Thanks!
  10. A result of this query is 1 and 2 but a result i'm looking for should be just 1. (select store_id from table where city_id = 1) gives 1 and 2 (select store_id from table where city_id = 2) gives 1 union distinct of these 2 queries gives 1 and 2 And again, I only want those distinct store_ids that are members of both grups, in that case it is only store_id 1.
  11. Hm, I don't want ALL distinct store_ids from both groups, I only want those distinct store_ids that are members of both grups.
  12. No, that is not correct, but thanks for your help anyway. Maybe I was not clear enough: I have to select store_ids where city_id = $city_id1 (that is group 1 of store_ids), then I have to select store_ids where city_id = $city_id2 (that is group 2 of store_ids) and the store_ids I need as a result are those distinct store_ids that are in both grups. For example: Group 1 store_ids – 1, 2, 4, 5, 9, 10, 11 Group 2 store_ids –2, 3, 5, 7, 9 Result – 2, 5, 9 God, I will bite my hand off with this one. I know there is something I'm missing here.
×
×
  • 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.