Jump to content

Mysql_query vs Sql_query ... difference?


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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