Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. This is for use in a prepared statment.
  2. First, find out which version you're running.
  3. How did you know which one to update without the PK?
  4. InnoDB or MyISAM tables?
  5. What are all those "ar"?
  6. Stop posting all the code, it doesn't help us figure out what you want. I assume that you have more than one page on your "site", so answering an SQL injection issue is impossible... but don't you have logs? As for your second question, you can sort server-side or client-side. And you should have continued your previous post if it's still related...
  7. I thought you wanted to toggle between b10 and b00.
  8. How do you mean? Oh, maybe just a single column output? You can use mysql_result( $result, 0, 0 ) to get back, say, a COUNT().
  9. fenway

    Holidays

    Well, this "problem" is simply that you need to know what dates are holidays... do you have such a table? As an aside, your code will be much easier to read (and write) if you have your $query variabled double-quoted.
  10. Wow... using a port handle as a computer name... yeesh.
  11. You can use a JOIN to get the categories... but the output is php-based.
  12. You need to get all categories first, then find the right one for each.
  13. Have you tried "Now() + INTERVAL 1 DAY"?
  14. Lucene/Sphinx?
  15. Sounds like an encoding (UTF-8?) issue....
  16. Like your table structure?
  17. Why the single quotes around your PHP variable?
  18. I don't think you want to.
  19. That depends on what you have right now... you want to toggle, right? If not, forget bitmasks.
  20. Bitmasks can be used to toggle bit fields.
  21. fenway

    Mysql Question

    Or you could use a CASE statement and issue a single udpate: UPDATE table SET cat = CASE id % 10 WHEN 1 THEN 'shoes' WHEN 2 THEN 'tvs' WHEN 3 THEN 'toys' ELSE cat END
  22. You're doing a full table scan for EVERY query, so of course your tables are locked all of the time. There are many good sites linked in the stickes on thsi forum. Nothing fixes everything.
  23. You either need to sync this DB "object" or connect to the 2nd DB.
  24. You need to fix the second order_id... I didn't give you that one... $dbres = $db->Execute('SELECT licences_code FROM products_licences' . " WHERE products_id='".$this->products[$i]['id']."'" . " AND orders_id='".$zf_insert_id."'" );
  25. You'll need the information_schema tables in MySQL 5 to do that...
×
×
  • 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.