thefollower Posted October 14, 2008 Share Posted October 14, 2008 I need help with my error logging script.. i keep getting the query stateing "Error" in my database... suggesting theres something wrong with the first two but i dont see any syntax issues so what else could it be ? Here is what i got: <?php $INSERT = mysql_query("INSERT INTO gamelogs (Log,LogTime) VALUES('connect established 4a','$Date')") Or die(mysql_error()); // inserts no problem $INSERT = mysql_query("INSERT INTO eventslogs (`Log`,`LogTime`,UserID) VALUES ('Your log has been inserted!','$Date','$custom')") Or die( $bleh = mysql_query( "INSERT INTO gamelogs ( `Log`,`LogTime` ) VALUES ('".mysql_error()."','$Date')" ) Or die( $bleh1 = mysql_query( "INSERT INTO `gamelogs` ( `Log`,`LogTime` ) VALUES ('error','$Date')" )) ); ?> I always get $bleh1 loggin error ... and no event is inserted nor is the $bleh query which should log the mysql_error so i know what actually went wrong is being inserted so its kinda impossible to know what is going wrong... I get no errors on my server error logs just to add. Hope you can help. Link to comment https://forums.phpfreaks.com/topic/128393-help-with-my-error-logging-system/ Share on other sites More sharing options...
Andy17 Posted October 14, 2008 Share Posted October 14, 2008 Try and remove the `` around gamelogs in $bleh1. Link to comment https://forums.phpfreaks.com/topic/128393-help-with-my-error-logging-system/#findComment-665216 Share on other sites More sharing options...
thefollower Posted October 14, 2008 Author Share Posted October 14, 2008 Try and remove the `` around gamelogs in $bleh1. Thanks for your reply, heres what i now have: <?php $INSERT = mysql_query("INSERT INTO gamelogs (Log,LogTime) VALUES('connect established 4a','$Date')") Or die(mysql_error()); $INSERT = mysql_query("INSERT INTO eventslogs (Log,LogTime,UserID) VALUES ('Your log has been inserted','$Date','$custom')") Or die( $bleh = mysql_query( "INSERT INTO gamelogs ( Log,LogTime ) VALUES ('".mysql_error()."','$Date')" ) Or die( $bleh1 = mysql_query( "INSERT INTO gamelogs ( Log,LogTime ) VALUES ('error','$Date')" ))); ?> I still get "error" logged into my database in my gamelogs instead of $bleh inserting the error...and no syntax error on my server error logs.. hope you can help! Link to comment https://forums.phpfreaks.com/topic/128393-help-with-my-error-logging-system/#findComment-665233 Share on other sites More sharing options...
thefollower Posted October 14, 2008 Author Share Posted October 14, 2008 bump Link to comment https://forums.phpfreaks.com/topic/128393-help-with-my-error-logging-system/#findComment-665289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.