Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. See here and here.
  2. Do what? I gave you the new query?
  3. What's "it"? How are they being copied?' And if you have the old my.cnf file, you'll see where the datadir is.
  4. Echo $insert_sql.
  5. Then you need to issue two queries -- the one you already have, and then a second one following a php function that parses the info you get back from the schema.
  6. Well, that's because you have only the table structure -- the frm -- you need to find the myd/myi (data and index) files.
  7. Get back to the point where there are no php errors -- comment out all of your code if you have to.
  8. MyISAM sholdbe be easy ... you can just copy frm/myi/myd files from the database directory.
  9. Um, no. If you can't get a proper die() statemnt to work, there are other problems.
  10. We need lots of information -- what server, what tables, what data, etc.
  11. You need 3 tables -- one of lists, one of items, and one that links lists to items. That's it. As for "in php", i mean the logic for if it's null or not. But if you normalize, you won't EVER have that issue, and you can do it all very efficiently in the db.
  12. You're mixing ANDs and ORs... that's not going to work.
  13. Also, you should normalize your table.
  14. fenway

    VIEWS

    1) there is no v4.5 of mysql 2) you can just use the select statement iself
  15. Well, this is why you need to normalize your table design. Why not handle this in php?
  16. Use this: select count(p.products_id) as total from (products_description pd, products p) left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '13' Next time, don't copy code from v4 to v5.
  17. But you said "Using FORCE makes the query takes about 0.0084 sec VS 0.0129 sec"... how is that "slow?
  18. Well, when you forced the index, you didn't have a filesort ;-) Which version of mysql?
  19. fenway

    Query Help

    a UNION combines two select statements -- which one of these generates that funny value?
  20. If you're saying that the query works from phpmyadmin but not your php script, then this has nothing to do with the db.
  21. well, that's due to the filesort issue.... but not sure how it could ever be any faster... you're asking for "all" rows at least one of the tables.
  22. fenway

    Query Help

    Which side of the UNION is generating this errant value?
  23. 1) you can't use * with group by 2) the value of "category" will be meaningless 3) you're not using your column alias in your order by
  24. You only have a single table -- you can't be getting back "multiple".
  25. Yes, please remove those, post your table structure, and show us the explain output again.
×
×
  • 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.