logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-17-2016, 05:54 AM   #1
sjmotos
 
Join Date: Nov 2016
Posts: 7
Default SQL Can not find the data with leters, but numbers is OK.

Hi my english is poor, excuse.

I am getting into this world and I need your help.
In my test page I have problems logging in, only result with numbers / Do not result in letters.
Should I put some "extra" in SQL for letters? What do I have to do to find the value?
With numbers I find, with no letters, I place the images where it is clearly seen.
Very grateful for your help, greetings from Chile.

Code:
SELECT `user`, pass FROM registrousuarios WHERE `user`=%s AND pass=%s



sjmotos is offline   Reply With Quote
Old 12-17-2016, 11:02 PM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,154
Default

'a' and. 'b'
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 12-19-2016, 03:00 AM   #3
sjmotos
 
Join Date: Nov 2016
Posts: 7
Default

I have solved it by changing "the" SQL, thank you very much for the help !! 0=poor 1=good


Code:
0 SELECT `user`, pass FROM registrousuarios WHERE `user`=%s AND pass=%s
Code:
1 SELECT `user`, pass FROM registrousuarios WHERE `user`='%s' AND pass=%s
sjmotos is offline   Reply With Quote
Old 12-19-2016, 03:52 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,154
Default

good, are you using prepared statements? it is more secure against sql injections
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com