Im building an application and Im having a bizarre issue where sometimes an sql statement will work and the very next call the exact same sql statement simply will not work.
I personally suspect its the hosting provider Im using maybe just not being fast enough to accept large volumes of sql calls to the database, but I figure I will atleast ask to see if anyone else has ever had similar issues
It could be the values you are dynamically adding to the query statement. You should escape the values to make sure they do not break your query.
In PHP you can use the mysql_escape_string() function. Documentation here: https://www.php.net/mysql_escape_string
Also if you are running the query from a browser, you can normally see the error if you do something like this: