Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Thanks for the vote of confidence... much appreciated!
  2. Post the query that you're using to get them back -- it's as easy as adding a slightly fancy order by clause.
  3. I have no idea what you're talking about. How are you storing these numbers in the database? What's your input look like?
  4. That's hard to believe... the sql works.
  5. That's something very different. First, you'll need to find any matching results, then make sure that all of the words you wanted are present.
  6. How have you determined that the DB is "messed up"? are you looking directly at it?
  7. Try this: mysql_query("UPDATE deals SET likes = LAST_INSERT_ID(likes + 1) WHERE id = '$deal'"); Followed by: $likes = mysql_query("SELECT LAST_INSERT_ID()"); Hope that helps.
  8. Well, you're not using LAST_INSERT_ID() in your UPDATE statement, so of course it doesn't work.
  9. A simple require_once() script will help you. I'd post a helpful topic for reference, but my bookmarks seem to have disappeared.
  10. Dunno... that doesn't meet my definition of "informative" either.
  11. Why not: SELECT * FROM songlist WHERE artist like '%$quicksearch[0]%' OR artist like '%$quicksearch[1]%' OR artist like '%$quicksearch[2]%' OR song like '%$quicksearch[0]%' OR song like '%$quicksearch[1]%' OR song like '%$quicksearch[2]%' ORDER BY artist Not that it's going to be particularly efficient.
  12. Meh... it happens. I hate it too.
  13. Show me the update statement.
  14. Have you set UTF8 after connecting?
  15. Agreed -- much better than before!
  16. Sounds like you need a few joins, and an EXISTS.
  17. Put the where clause after the join.
  18. Won't a simple where clause work? What's not working?
  19. Why is everything a varchar?
  20. A simple var_dump() will work too... but once you've estabilshed the sql part is working correctly, everything else really falls under the scope of php.
  21. Here's how you do it -- you present them via a drop-down menu of flying times -- in whatever hour increments are appropriate -- say, 0.5h, 1.0h, 1.5h, etc. -- and then you simply submit the value attribute of the option tag in minutes to your database. It's that easy.
  22. Well, the table isn't normalized, which is likely part of the problem. But your example shows a single table, yet your query refers to multiple.
  23. You'll need use LIKE and %.
  24. You need a many-to-many table, not delimited fields.
×
×
  • 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.