Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/15/2024 in all areas

  1. Your function is ony interested in the latest draw so why query for every draw since 2004, just LIMIT the query to the 1 row you need instead of fetchong all then discarding the 2,079 that are surplus to requirements. The speed of a query is proportional to the amount of data returned so keep it to the minimum required columns and rows. SELECT N1 FROM EuroMillions ORDER BY Draw DESC LIMIT 1;
    1 point
  2. What does the fetch() function return? I think you need something more like this: $row = $stmt -> fetch(); echo( $row[ 'N1' ] ); Also, avoid using "select *" in Application code. Whilst you might not have a lot of columns in that table [yet], databases are inherently shared entities and you never know when someone [else] might add a dozen columns full of gigabytes of stuff that this query simply doesn't care about. Always select just the columns that you specifically need. Regards, Phill W.
    1 point
  3. Hi. Not much into contact forms myself but just did a quick google. 6 years old but might give you ideas: https://github.com/SH1R3F/Contact-Form---PHP-OOP
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.