acctman Posted October 21, 2008 Share Posted October 21, 2008 what are the difference between the two mysql_query and sql_query? Quote Link to comment https://forums.phpfreaks.com/topic/129461-mysql_query-vs-sql_query-difference/ Share on other sites More sharing options...
rhodesa Posted October 21, 2008 Share Posted October 21, 2008 there is no such function (in PHP) called sql_query() Quote Link to comment https://forums.phpfreaks.com/topic/129461-mysql_query-vs-sql_query-difference/#findComment-671171 Share on other sites More sharing options...
acctman Posted October 21, 2008 Author Share Posted October 21, 2008 there is no such function (in PHP) called sql_query() but I'm able to use sql_query("UPDATE... with no problem hmm one difference I just noticed was when I have an error with my query mysql_query("UPDATE... doesn't show or tell me the error. I just doesn't work, but when I ran it with sql_query("UPDATE... a problem I was trying to figure out for almost 2weeks was shown to me with this error (see below). mysql_query didn't show anything sql_query will show the error. Simple oversight of not put m_turn_on in my form post name had me re-writing php coding and editing forms, when I could of just used sql_query and found the error a long time ago. Unknown column 'm_turnon' in 'field list' Failed query: UPDATE rate_members SET m_turnon='RMB...' WHERE m_id=39 Quote Link to comment https://forums.phpfreaks.com/topic/129461-mysql_query-vs-sql_query-difference/#findComment-671189 Share on other sites More sharing options...
rhodesa Posted October 22, 2008 Share Posted October 22, 2008 well, sql_query must be a user-defined function from an included file somewhere. my guess is that sql_query is just a wrapper of mysql_query that echos out any errors it finds when it runs the query. that being said, it's probably not your function that is the problem. it's telling you that m_turnon is not a column in the rate_members table. so, check your table, confirm the column is there and you spelled it correctly. Quote Link to comment https://forums.phpfreaks.com/topic/129461-mysql_query-vs-sql_query-difference/#findComment-671771 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.