Jump to content

requinix

Administrators
  • Content Count

    11,011
  • Joined

  • Last visited

  • Days Won

    203

Everything posted by requinix

  1. requinix

    Trouble with showing image in url

    Why send them to another page if they're just going to come back? Take care of it all on the one page. Possibly with AJAX so you don't have to redirect the user at all. They win and get a trophy. The very act of winning should come with a request to your server to update the fact that they won - and also give the trophy. The page does that with AJAX, and when it finishes it displays the message on the page.
  2. And is your #submit a regular submit button inside a form? A button that will try to submit that form when clicked?
  3. requinix

    Trouble with showing image in url

    It's not good to take some message in the URL and show it right on the page: anyone could repurpose that message to show whatever they wanted. You'd have to do some sort of validation, "is this message okay", and that's ~difficult~. How are people getting to this page.php? Can you use a form for it? You could POST a piece of data (not a message), like whatever this thing that they found is, then page.php can look for the form data and display the message (which it figures out in its own).
  4. If you ever need functions like MAX or SUM or COUNT and you don't want to count the entire table at once then you need a GROUP BY clause. If you want to select a column and then use those functions on others, you should probably be GROUPing BY that first column.
  5. requinix

    mySQL and rebuilding keys

    For a regular index, that "col2" would be the name of it. For a primary key (which I forgot was different) that doesn't use a name, that "col2" would be the index type. Of course "col2" and "merchandise" are not valid index types so I would have expected at least a warning. And I don't have a MySQL lying around to test with. So I'm thinking it's (accidentally?) ignored for sake of compatibility with other types of indexes.
  6. requinix

    mySQL and rebuilding keys

    Where there any warnings with the "ALTER TABLE mytable ADD PRIMARY KEY merchandise (merchandise)" statement?
  7. requinix

    mySQL and rebuilding keys

    Are you sure? What was the output?
  8. requinix

    mySQL and rebuilding keys

    Okay, so I thought a SHOW CREATE TABLE would include the indexes. Do the other SHOW INDEX FROM.
  9. requinix

    mySQL and rebuilding keys

    Try more like a SHOW INDEX FROM TableX SHOW CREATE TABLE TableX
  10. Use your browser to watch the AJAX request happen, and see what the response to it was.
  11. requinix

    mySQL and rebuilding keys

    This may be a bit more technical than you're expecting, but it answers essentially what you're asking about. Have MySQL describe the table and its indexes for you after each command. Look for the difference.
  12. requinix

    mySQL and rebuilding keys

    1. Because MySQL updates the index automatically. After all, having to manually rebuild the index every time data changes would be incredibly tedious. 2. Same thing. One key is named automatically, one key is named manually. And no, the name does not matter. But adding the primary key after the table is created is annoying - do it when the table is created, inside the table definition.
  13. requinix

    Trouble with showing image in url

    What is your real problem? Because allowing there to be HTML markup in the query string that you then display on the page is very much not the right solution.
  14. e is an event object. e.target is the object firing the event (the select). You can get the files from it.
  15. requinix

    issues with Libreoffice

    Help for what? I told you not to run it from the command line, which you're still doing, but now you've posted part of your kernel log which I can only assume you're doing for a reason that I can't figure out.
  16. requinix

    Service to support different types of resources

    Can you decouple the storage mechanism from the chart? Entirely? The general chart service would lookup the basic chart information, determine the data source, and inject that into the chart.
  17. requinix

    Service to support different types of resources

    RemoteChart sounds like it's more of a data thing than a chart thing. Sounds like you need to abstract out the data retrieval/storage process. Probably specialized for the way charts will use it, but more or less separate from the actual chart business.
  18. requinix

    Service to support different types of resources

    "Service" is probably a more accurate term. It may be functioning like a controller in that it has various actions called for requests, but it isn't directly interacting with the request or response so it's not quite entirely a controller. You're talking about single-responsibility with the chart creation bit? You're still observing it: the single responsibility of creating charts is in one central location. Your method seems more or less right: single place to look up chart data, chart identifier maps into a class through a factory, class handles the precise work of the various operations. Chart types are not dynamically created (eg, no user-defined types) so hardcoding identifiers and class names is acceptable.
  19. requinix

    changes in the UUID - how to achieve that !?

    Have you seen /etc/fstab?
  20. The problem isn't that you have to intval() things. The problem is that $var1 and/or $var2 are not proper numeric values. You need to figure out why that might be the case, then probably add or edit input validation so that the non-numeric values are not being allowed.
  21. requinix

    issues with Libreoffice

    Don't start it from the command line.
  22. The AJAX request failed. Use your browser's developer tools to see what happened with it.
  23. Use mt_rand() to generate a random number.
  24. That's a new warning for PHP 7.3. Your composer is 1.4.2, current is 1.8.5.
×

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.