Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Did you actually close your entire browser, all tabs, all windows?
  2. Specify what columns you join on. If you're going to use table aliases make them make sense. a and b are meaningless. You also should be using a primary key ID instead of the username. Username should only be stored in the user table, everything else should use their user id. You are running one query to get a user, and then selecting the information for that ONE USER. You need to do just ONE query joining the two tables only limiting it to the logged in user, not BOTH users.
  3. ... Google "mysql join"
  4. Never do queries in loops. Join the two tables, and use an ORDER BY clause.
  5. The same way you add them, but in reverse. I'd do it in jQuery if I were doing it.
  6. That doesn't change our rules. You're not special. Double posting is not allowed. If you were not able to get help for this in three months it's not going to happen now just because you post a 5th thread for it.
  7. If you're using their API you shouldn't need to copy their profile photo to your own site.
  8. You've made multiple threads for this. Stop double posting.
  9. You'd have to insert spans around the letters you want to change. You should consider using an existing tool like TinyMCE. No need to reinvent the wheel when it's a really complicated wheel and every road has different rules.
  10. I don't know that you can run IIS and WAMP at the same time. Try picking just one.
  11. Facebook has an API. If you want your users to login with Facebook credentials, you can then get their profile photo. A lot of sites do use Facebook for login.
  12. Sounds like Facebook blocked your script which violates their tos.
  13. I'd add to Barand's way to add a column specifically called 'order_by' or something, so you can easily change the order - this is vital when you ADD a new value and need it to go between two existing values.
  14. I'd be pretty annoyed if I could only be logged in on one of my 5 devices at a time, I'm constantly going back and forth from my PC to laptop to phone to view PHPfreaks. If I had to login again each time I'd stop using the site.
  15. Wait are you saying you actually stored the results of a var_dump into an array? Why on earth? Go back to where that got all messed up and fix it there.
  16. and the problem IS?
  17. Google "Data Normalization". As for your second part, it seems pretty obvious to use the date the post was created. I'm moving this to application design.
  18. I'm pretty sure you still need to tell PDO the host, user and password, using your $_SERVER vars.
  19. You should probably fix the sorting issue first. Is the column a varchar instead of an int? You'll probably need to use a subquery for the random part. Or you could select a random number in PHP first, $row = rand(0,9); $sql = "Select * FROM clicks WHERE title!='' ORDER BY clicks DESC LIMIT $row, 1";
  20. Add a LIMIT 1 and it should be fine. Did it work?
  21. If all you need is the very last post you really should LIMIT it in the query. YUo
  22. If all you need is the very last post you really should LIMIT it in the query. YUo
  23. If all you need is the very last post you really should LIMIT it in the query. You also should do a COUNT in your other query to just get the number of rows.
  24. Now time to read the link in my signature on debugging SQL
×
×
  • 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.