Hi, I used to upload content in mysql using a php script. The script was working fine and content was getting uploaded in mysql. But now suddenly it says "query failed" and the script dont work to upload content in mysql. I never made any changes to the script. Want to know why this happening suddenly? Any help would be greatly appreciated. Is it that mysql has not enough space left? Till now I only used around 2.42 MB space for mysql as what it says in control panel. Hosting package is however 5GB which is what it says in control panel. Thanks!
try adding an or clause to your mysql query. E.g. mysql_query("something")or trigger_error(mysql_error());
Check the server logs - there should be some info of why it's happening. You may need to enable error logging in cPanel.
Did your text include a '. If your query failed MYSQL always returns a response with MYSQL_ERROR() if you have no response you didn't send a query to the database!
Add Firebug and FirePHP to your toolkit. Have Firebug send you the query just before the mysql_query line, then you can see the actual query being sent. If that doesn't help you, you can put that query into phpMyAdmin (I wouldn't be on a site that doesn't have it) and see why it's not working.