Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

1,007 Excellent

About justsomeguy

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location

Previous Fields

  • Languages
    Focusing on PHP and JavaScript

Recent Profile Visitors

284,193 profile views
  1. Adding a 2d constraint

    You just find a balance that works. Early on I used to run queries in loops, for example, because it made sense to do that, but that doesn't scale. It turned out that instead of looping through each row and doing additional queries, I could use a more complex query with a join or something else where I could eliminate the queries inside the loop and just return everything I needed to start with. That kind of thing obviously scales much better than looping over the data and doing additional queries, but the queries get a lot more complicated. Then you can use the database server to analyze or explain a query to see how it's going to execute it, and that might influence how you define indexes and keys on those tables to speed things up. The right indexes can reduce the speed of a query by several orders of magnitude.
  2. URL Encoding and Decoding - Javascript vs PHP

    Also, for what it's worth, URLs do have a maximum size limit, and it's not the same across browsers. So, be careful about how much you decide to cram into a querystring. If you can use a post request instead, do so.
  3. invoke phone keyboard on autofocus

    From what I can tell, it looks like at least some phones require some sort of user interaction to show the keyboard. So, if you set focus from inside a button's click handler, that would show the keyboard, but setting focus inside the page's load handler does not because the user didn't interact with the page.
  4. Adding a 2d constraint

    I'm not sure where you're going with that. If you want to get all of the data including the minimum price (this assumes that all of the values in the rows are the same except the price), then you just group by all the other columns like you showed: SELECT id, datetime2,store, vendor_id, item_id, MIN(price) AS minprice FROM ( ... ) AS subset3 GROUP BY id, datetime2,store, vendor_id, item_id
  5. Adding a 2d constraint

    That's right, you have to group by any and every column that is not part of an aggregate function.
  6. multiple size definitions for modal images

    Why do you want to use Javascript for that? If you're listing out the images yourself in the HTML, then you can assign a different CSS class to images that you want to display differently.
  7. Adding a 2d constraint

    You should be able to list all of the columns you want to select, including the minimum price, and group by everything except the price.
  8. My Field Validation Code Not Working

    What happens when you run that, what exactly is the problem?
  9. anyone help me with chartjs adn mysql, please

    Then that's where you need to look. You need to look at the code that PHP is producing though, in your browser you need to view the source of the page and check to make sure that the Javascript code that you're having PHP output is valid code.
  10. Using iframe to display a php file

    Your frame src is a local file path. It needs to be the HTTP server path.
  11. Using iframe to display a php file

    Your frame src is a local file path. It needs to be the HTTP server path.
  12. anyone help me with chartjs adn mysql, please

    The first thing to do is check for Javascript error messages, and look at the generated code that you created to see what all the browser sees.
  13. Slideshow - No initial image

    You're getting a Javascript error on that page, it might be caused by including and running that Javascript code before the elements on the page are ready.
  14. Displaying Table Results on a page

    In general, you send a select SQL query to get the data you want, and you loop through the results to display each result however you'd like. WordPress should already have a database object you can use to interact with the database.
  15. Keep a form open to enter data

    You need to use event handlers. You can use a key event on the field itself, or a click event on the button or whatever, but that event handler should get the form data and set it in localstorage.