Jump to content

Mysql_query vs Sql_query ... difference?


acctman

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.