Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I think LOAD DATA INFILE has the equivalent on "ON DUPLICATE KEY UPDATE".
  2. Well, if you get a proper db dump, it should be simple enough.
  3. The keys were disabled? I've never heard of that happening "on its own"...
  4. More about this here.
  5. Um... no database queries?
  6. Don't you mean mysql_insert_id?
  7. DISTINCT is not a function. Use group by.
  8. You'll have to use backticks around any identifiers that have spaces in them -- `like this`.
  9. Yikes... use a single statement.
  10. Um, no.... you'll need LIKE '%TEA%'
  11. No, you don't.... format/pad the number on output.
  12. You can check the output of COUNT() in a HAVING clause.
  13. This something that doesn't need to be done by the DB.
  14. you need to sort by both -- LEFT( yourColumn, 1 ) and the the substring to skip the letter.
  15. Update how?
  16. Echo the actual query... it's probably getting run twice.
  17. You'd have to split your search query on, say, spaces, and then test each keyword separately.
  18. The problem is your use of group by & mixing comma and JOIN, amongst other things.
  19. I don't understand... you mean to query this table? What output are you expecting?
  20. Next time, use code blocks, and don't post your access credentials! As for the upload, there are countless tutorials on php image uploads....
  21. you need ppk%, not ppk_ -- the latter matches only one character. And an anchor, too....
  22. You can't use SUM in a WHERE clause.
  23. Right... that makes sense. The trick is to "order" by the lowest probe value, and then carry that forwards. Like this: select t1.* from exp as t1 inner join ( SELECT r1.*, @rank:=@rank+1 as rank FROM ( SELECT probe, MIN(pvalue) AS pvalue FROM exp WHERE pvalue<0.05 GROUP BY probe ORDER BY pvalue ASC ) as r1 cross join ( select @rank := 0 ) as r2 ) as t2 using ( probe ) order by t2.rank ASC, t1.pvalue ASC No SP required!
  24. I find that hard to believe... does each individual select return the expected results?
×
×
  • 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.