Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You can order by MATCH..AGAINST... too -- otherwise, you'll need to roll-your-own weighting algorithm.
  2. You can use binary... those are numbers, too.
  3. ON... goes before TO...
  4. This is ultimately a pagination issue... you can't use IDs for this.
  5. Because not every query can utilize every index (very true for 4.1) and it's expensive to keep it up to date.
  6. Did you try (UNTESTED): UPDATE tb_users tb WHERE EXISTS(SELECT tb2.ip FROM tb_users tb2 WHERE tb.ip=tb2.ip AND tb.username<>tb2.username) SET tb.suspen='logged'
  7. What do you mean you don't have indexes? WHY NOT?????
  8. I only see one query....
  9. You can definitely load data in bulk from CSV... in fact, newer versions of MySQL can even using the CSV file as a storage engine. If you're having trouble, you likely haven't exported your XLS file correctly, or your LOAD DATA INFILE statement is wrong. Post the relevant info.
  10. A LEFT JOIN is also an option here...
  11. I'm very confused... you want to run the update for only the matching users from the select? Your current update has no where clause!`
  12. Impossible to say... what makes you think it's wrong?
  13. It's not weird -- you've corrupted the ON clause. What you want for the second query is this: SELECT components.manufacturer, components.part_num, components.stock FROM components LEFT JOIN $bod ON (components.part_num=$bod.manufacturer_num) WHERE $bod.manufacturer_num IS NULL
  14. Oh sure, Barand gets the credit ;-) lol.... j/k...glad you got it working.
  15. If by "line" you mean "field", then likely yes.
  16. Sounds like you're missing a call to mysql_select_db.... impossible to tell since we haven't seen any code.
  17. According to the refman page, it is a write permission issue, and has nothing to do with innodb.... But your second problem does... what version? Sounds like you have --skip-innodb... what does SHOW ENGINES say?
  18. The code snippet is very confusing... 1) you named variables "query" that are really "results" 2) query3 is the same as query7, but you use query2, which is never defined... 3) query7 is the same as query1 No wonder you're getting strange things... GIGO.
  19. That's generally the way that I do it, too.
  20. "between" makes no sense... mysql doesn't have loops... and your use $db twice, so the queries are identical.
  21. Write permissions?
  22. MyISAM locks don't come from that many places...
  23. you can & it with a bitmask.
  24. It's quite easy if you check DAYOFWEEK() [1..7, starts of Sunday].
×
×
  • 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.