Hello,

about 3 months ago I made simple chat using MySQL++ which is working fine, login function:

http://pastebin.com/Mdup4zi6

but today I'm creating Control Panel, I've copied and changed this function a little bit, but i'm getting 0 results (if I copy syntax to navicat I'll get password so...)

login function: http://pastebin.com/XmzdVzFx

the problem is that result.size is 0, even if I have right username in DB

queryy += "SELECT * FROM accounts WHERE login = '";
		queryy += lUsername;
		queryy += "'";

navicat and chat are returning 1 result (which is right)

lUsername is right (I made a check with MessageBox)

What is the value of queryy before that first += ?
Should that just be = ...on the first one?

+= is ok there because he's using std::string

Your program probably needs to check for sql errors on return because it could be some other problem, such as not logged into mysql.

I already fixed it, I was using release lib for debug mode :X

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.