Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Don't comment it. Leave it be. Do you know what it is? Do you know what it means?
  2. Look at line 3 of phpMQTT.php.
  3. Uppercase or lowercase does not matter. Read the rest of the page. It tells you how to use a WHERE clause. Correctly.
  4. WHERE And please ask your database questions in the appropriate database forum.
  5. I think you missed the point. It doesn't matter what timezone the user is in because you're recording and comparing dates on the server. A duration of one year is a duration of one year for everyone. Please localize it. Don't record the end time at all. It starts at a particular moment, it goes up until the date that's one year later, and you check for validity using a <= so that the end date is also considered valid. It will give the user slightly more than one year, and depending on timezones that extra may or may not be noticeable to the user, but who cares.
  6. One table. You create the order in a pending state when they complete the first page. You can update that order with information from the second page, with user information if/when you get it, with whatever. When all the requirements are met you can switch the order to complete or ready or whatever.
  7. If that happens then, with my description, the order will be marked as pending and only have some fields filled in. Or maybe it has everything filled in but it's still pending, not sure. Either way, you can query the table to find these people. Also not sure about this user vs. visitor distinction, but I believe the answer is still what I said: the order is pending, has some information filled in, does not have the "user ID" part of it provided, and you can query for that.
  8. One table for orders. They can be marked as pending/not complete. That's okay. They can have incomplete information - while still pending. That's okay.
  9. You need to address this. Everything should be HTTPS nowadays and there is no good reason why anything should not be. Especially when it comes to content like advertising - that needs to be served in a secure way. I cannot believe there is no way to get those ads working over HTTPS. Check their documentation, complain to support, whatever.
  10. - A role is a user. - Easy mode: a database is a database, ignore schemas and just use "public". - Don't worry about clusters. - Ownership is... ownership. I mean, it's the same thing that it means in English. Owning. - Apache and php-fpm can run as different users, if you want. - No, roles don't need to have database with their name. It's just easy that way. - You can't create a database and give ownership to somebody your role isn't associated with. Use the postgres user to create the michael database, owner michael. Then reconnect as michael and do whatever you want.
  11. Remember what I said about using a form? Use a form.
  12. I'm not sure I followed that question but I think the right reply is something like "if you enter 3-15-2020 as the date then what is the time?"
  13. Use a form, not a link.
  14. If the database is on the local machine then you should use peer authentication. When something connects locally, PostgreSQL will ask the system for the username on the connecting end. That'll be your php-fpm pool user. It then allows a connection to the database by that name. IIRC, 1. Use a different user than "postgres". Create a new system user and update your php-fpm pool to use that username (which should mean creating a new pool if you have more than one site running). Restart, obviously. 2. With PostgreSQL, set up authentication for that new user. 3. Create a matching database and move all your data into it. Be careful about ownerships. 4. Update your PDO connection: no host so it connects locally, and drop the username (it's automatic) and password (not used).
  15. In other words, read this.
  16. ... What is the HTML outputted, both when it didn't work and after your change that made it work?
  17. The code could use some improvement but it should work. Have you done a View Source of the page to make sure the HTML being outputted is correct? Does "cannot get it right" mean anything more than just the checkbox remaining unchecked?
  18. You know what would be even better than that? Not storing the duration. Like Barand said, you don't have to bother storing it and then worrying about what to do when values change when you can just call TIMEDIFF whenever you need it.
  19. TIMEDIFF returns a time string, not a number. If you need a number then try TIMESTAMPDIFF.
  20. 1. As far as I can tell, the "rules" is supposed to be a string - not an object. If you didn't need to account for is_page_loaded then you should say <validation-provider ... rules="required|positive_price"> 2. The validation function needs to return true or false. You are returning string or false.
  21. They aren't the same width because you don't have any sort of CSS in there that says anything about a width. It's not like the browser can read your mind about how you want it to appear... Have you tried giving the buttons a width?
  22. Hopefully you being new means you didn't write that code. Right? Because it's... not good. How about some information about this thing? What it's used for? Where? I ask because the problem it's trying to solve is much, much better addressed in other ways - other industry-standard, best practice sort of ways - and I want to know whether it'll be a bother to change it.
  23. Trying my best to not sound flippant, Have you tried Google?
  24. Their own documentation lists a couple jsfiddles. Have you looked at them?
  25. 302 is a temporary redirect that is not supposed to be cached unless the server says it can be cached. Make sure that redirect - the one from nginx - isn't also sending caching headers.
×
×
  • 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.