Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Like this: SELECT * FROM `users_cinemas` LEFT JOIN `users`ON`users`.`id`=`users_cinemas`.`user_id` LEFT JOIN `cinemas`ON `cinemas`.`id`=`users_cinemas`.`cinema_id`
  2. Well, technically this belongs in the php forum, but if you've ordered the result set correctly, they will already be in the desired order. All you'll need to do is "notice" when the section changes. I can move this topic to the php board if you'd prefer.
  3. I disagree -- why not a simple join?
  4. You get to decide how mysql interprets out-of-date values based on sql_mode -- if it's strict, it will barf.
  5. OK -- well, if that join returns the expected result, you're just left with application code to adjust the layout per "section".
  6. "Focusing light" is not a current scientific theory -- it's not going anywhere. And yes, while polishing a mirror to 1 angstrom is a "technical limitation", it's almost not going anywhere. Like I said, it's a practical hard limit, not a theoretical one.
  7. You're written a query with an error -- find it.
  8. The problem with that is two-fold -- first, if you list is long, it can get truncated without your knowledge; second, if you ever want other fields back, you're screwed.
  9. Still no good -- you'll need a left join.
  10. Can you post the join you've written, and we can take it from there/
  11. the better way is to join the tables properly in mysql, and then have the application code sort out the rest.
  12. Well, that way you'll never get unassigned ones.
  13. That if statement belongs in your application code, not the database -- "all values" means no where clause.
  14. Given sufficient magnification you would be able to see anything regardless of size. Just because a piece of technology doesn't exist doesn't mean it cannot exist. Yes, of course, and I wasn't stating otherwise. I was just saying that at current we don't posses the the technology. Actually, there is a practical hard limit -- magnification requires a lens to bring the image into focus, and that lens has to be smooth, or the resulting image will be fuzzy. And you can't polish a lens to be infinitely smooth -- in fact, it's pratically impossible to focus x-rays at all, which have a wavelength on the order of magnitude of atomic resolution. In my other life, I did years of graduate training to work around this exact problem -- it's a royal pain in the butt.
  15. What's "everything"? Why manually?
  16. That's quite the hack -- I wouldn't be happy with that in my code. Simply don't pass the date if it's not a date.
  17. Echo the actual queries.
  18. And you're certain that the old DB was working correctly before?
  19. Besides, you decide what to do with the variables passed by the form.
  20. select q.*, a.* from questions as q left join answers as a on (a.answer_questionID = q.question_id)
  21. Thanks for the vote of confidence... much appreciated!
  22. Post the query that you're using to get them back -- it's as easy as adding a slightly fancy order by clause.
  23. I have no idea what you're talking about. How are you storing these numbers in the database? What's your input look like?
  24. That's hard to believe... the sql works.
×
×
  • 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.