Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. First, why are you inserting the UID at all? Sounds like your script (or the insert) is running twice)? I don't know about your second issue.
  2. 1. Join the table to itself, and use this p1=p2 as the join condition. 2. I don't see users anywhere.
  3. To what end/
  4. You're running a query -- it doesn't work. You don't have a "or die(mysql_error())" so you can't see what mysql is complaining about. The least you can do is show *us* the query so that we can tell you what might be wrong. Without echo, that's impossible.
  5. Until you can track down that original punctuation string error, I wouldn't give too much thought to the other warnings.
  6. One would hope that PHP would have a way to capture STDOUT / STDERR from a system call ;-(
  7. You have the wrong password.
  8. If you have access to the CLI, you can just redirect it in.
  9. Define "doesn't work"...
  10. You want all books on the same reading list as idcol = 1 from the books table?
  11. It's going to be tricky to do this for every "name"... because each would require its own LIMIT & OFFSET. Hmm... let me think about that for a bit...
  12. The length of decimals fields includes all sig-figs... so you need to "decide" how many to allocate to decimal places.
  13. That's because you have no join condition between those 2 tables ... has nothing to do with the "searching" perse.
  14. You want a single query, just ordered differently... no need for a union here.
  15. You're right I feel stupid now, I thought I would never need to know about reserved keywords. If you put an underscore in every column name, you're almost certain never to have to deal with them.
  16. Reserved keyword?
  17. That can be very slow, since it's a correlated subquery -- it has to run for EVERY record in the outer table... a LEFT JOIN ... IS NULL would be better.
  18. Read though this refman page and see if that clears anything up.
  19. Well, LIMIT 3,1 will return the 4th row of a recordset.
  20. That != in your ON clause will cause problems.
  21. $query = "SELECT author, authorno FROM authors where substring(author,1,char_length('$input')) = '$input'"; I don't know where the last $ came from.
  22. Keys are "used" automatically... the question is which columns to index.
  23. SELECT b.buyer_name, p.prod_name, ol.quantity FROM order_list AS ol JOIN buyer AS b ON ( b.order_id = ol.order_id ) JOIN products AS p ON ( p.prod_id = ol.prod_id )
  24. I'm confused by your question... they obviously have different columns... how do you want them combined?
  25. So you always want the fourth one, for each name? What if there isn't a fourth?
×
×
  • 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.