mysql database search error

I have a question, for example I input something on edit and in that time when I'll click on search button it will show find message, but it shows mysql error :'( why? what I am doing wrong in this code? :(

For the connection specified by mysql, mysql_error() returns a null-terminated string containing the error message for the most recently invoked API function that failed. If a function didn't fail, the return value of mysql_error() may be the previous error or an empty string to indicate no error.

MITRMKAR
I do like you posted but it already says mysql error. please help me :(
when I am doing like this
result1 = mysql_query(conn, "SELECT * FROM writers WHERE name = 'something'");
and when I click search button it says find.

What I was trying to say in the post #4 above, is that you have to learn to use the MySQL API functions correctly. The API is well documented in C API Function Overview (that's for version 5.5, use the documentation that's relevant to your library).

So when you use the mysql*() functions, be sure to check whether a given API call succeeded or not. If not, try to figure out the reason, the API documentation might prove helpful here. If you don't do that, you'll simply waste your time being at loss with what's wrong and what's not.

In the post #4 above, the mysql_error() is used in an attempt to provide useful error diagnostics message to you, instead of plain " MessageBox(0,"mysql error",0,0); ", which really doesn't help much. But by looking at your code, you've chosen not to use mysql_error() , I suspect that you didn't quite get the idea (?). Anyway, maybe start by trying out that simple thing, study the API and see the difference.

and I have one question againhttp://d221127.u-telcom.net/lashatt/mysqladdpassworderror.JPG
here when I'll input on edit something like integer for example 7 and after when I click to add button after this I want this 7 should shown on password area(on the down of password,I mean on the data of password), but when I click add it doesn't happens anything :(, I am using this functions