Jump to content

burhankhan

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

burhankhan's Achievements

Member

Member (2/5)

0

Reputation

  1. Yes i have this: I want two queries: 1- get all products that have country USA. 2- get all products that have option_id 1.
  2. ok here is my database design and its values: I want two queries: 1- get all products that have country USA. 2- get all products that have option_id 1. Can you help me?
  3. Will following BOLD values are NOT un-nessassary? 1 | 1 | 1 1 | 2 | 1 1 | 1 | 2 What should be complete Optimized query to get all products that have country_id = 2? I know joins or inner queries should be use, but don't know how.... Can you please provide me complete query?
  4. ok i understand. So middle table should be like: product_id | country_id | option_id | Right? But i think it will not allow me to have multiple countries and multiple options against each product??? If i am wrong, what should be design of Middle Table?
  5. because table_id can be either country_id or option_id. that's why i named it table_id and i will identify that ID using table_name. For example if table_name is countries, then table_id will be ofcourse ID of country...... Let me know if i am doing wrong?
  6. Hi Revraz, thanks for reply. Middle table contains product_id, table_name and table_id. (Table_name is name of other table, like countries or options) For example if a product_id 7 exists in USA, CANADA, INDIA, CHINA (these countries have IDs like; 1, 2, 3, 4 respectively) and options are OPTION-1, OPTION-2, OPTION-3 (these options have IDs like; 1, 2, 3 respectively) then Middle table is like: Middle-table: product_id table_name table_id 7 countries 1 7 countries 2 7 countries 3 7 countries 4 7 options 1 7 options 2 7 options 3 I am not sure, if my database design is correct or not..... If it is not correct can you please guide me? Actually each product have multiple countries, and multiple options.... that's why i design like this. Regards, Burhan Khan
  7. Hi: I want to get data from multiple tables. I have designed a design of my database in MS Access. Actually there are 4 tables. one is PRODUCTS (i want to get products from that table) 2nd is COUNTRIES (products can be deliver to multiple countries) 3rd is OPTIONS (each product will have some DEFINED options) and 4rd is MIDDLE-TABLE, i have created it as middle table. Actually each PRODUCT can have multiple COUNTRIES and multiple OPTIONS. My questions are: how to fetch all products in USA? or all products that have OPTION # 3 ? I know middle-table is not a good idea, because it contains tables names and their IDs, like country_id or option_id..... But i am not understanding how to do this? Can anyone suggest me with a sample query? Regards, Burhan Khan
  8. which inserts you are talking about? please clear me about batch inserts......
  9. Hi: How can i count hits on any image? I know i can use url-rewrite and then execute little script to update database and then show image. But it will slow downs server if there are thousands of images! Get i get something like awStats are doing? Or any other way? Thanks Burhan Khan
  10. Some time 30,000 records need to be fetch, some time only one record. And some time need to count number of records in it using Count(*). It is only one table that is making problem.
  11. What is general solution for a big database? If there are 10 queries in every second from that database, how we can manage it? Ofcourse server will got down, when it spends 3 seconds in each query.
  12. Hi: I have a database of members with 3 Million records. Its size is 400 MB. When i query to get records from that database, it takes too much time (2, 3 seconds) and server become busy when there are some queries from that database. I searched its solution, and found that i should split that database into many tables. How can i do this? There are primary keys (ID) into that table, if i will split it, how can i manage it using php? Or is there any other solution? Thanks Burhan Khan
  13. I have tried your script but it is not working with this string: [quote][quote]this is quote 3[/quote]this is qutoe 2[/quote]this is in the quote It should return this: this is in the quote But it is returning this: this is qutoe 2[ /quote ]this is in the quote Any suggestion?
×
×
  • 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.