Originally posted by JimS
View Post
Announcement
Collapse
No announcement yet.
SQL search
Collapse
X
-
I could use string to lower all the time, thing Is I have to make it work with the DB has shes pushing over 700 books and I think she would kill me If I lost all the books lol.Originally posted by webultra View PostNop, I don't think you could get a result if the string to search is encrypted. This because if you have the word "HELLO" encrypted and stored in your database then the recorded value could be something like "FGT#$RC#$" (just an example), and if the string to search is something like "HELLo", "HeLlo" or "****" then the encrypted value is another totally diferent like "Ff43ffDKFDJI". That's the little problem with encrypted stored data.
Leave a comment:
-
Nop, I don't think you could get a result if the string to search is encrypted. This because if you have the word "HELLO" encrypted and stored in your database then the recorded value could be something like "FGT#$RC#$" (just an example), and if the string to search is something like "HELLo", "HeLlo" or "****" then the encrypted value is another totally diferent like "Ff43ffDKFDJI". That's the little problem with encrypted stored data.
Leave a comment:
-
I will test that thanks Reset but I am ecrypting before its sent in the search so I think it should be ok right?
Leave a comment:
-
replace your query with this
but if actual data is encrypted this search will failCode:"SELECT * FROM bookstore where " .. sData.. " like '%" .. Enclose(SimplyR.Encrypt(sText)) .. "%'"
because search will never match with any entry of database
and encryption will produce a different text
Leave a comment:
-
You are probably going to want to use LIKE and wildcards.
Take a look at
http://www.w3schools.com/sql/sql_like.asp
Leave a comment:
-
SQL search
I need little help a few months back I made my partner a program so she could keep track of her books, anime & manga
I am having a problem she wants to have a partial search and I can only do a fixed search.
Here is my function:
she want to add to the search lets say manga and get everything with manger in the title in that topic.PHP Code:
function SimplyR.Search(eList, sText, sData)
SimplyR.SQLOpen();
tbReturn = SQLite.QueryToTable(db, "SELECT * FROM bookstore where " .. sData.. " = " .. Enclose(SimplyR.Encrypt(sText)) .. "");
ListBox.DeleteItem(eList, LB_ALLITEMS);
if tbReturn and tbReturn.Rows > 0 then
for i,v in pairs(tbReturn.Data) do
ListBox.AddItem(eList, SimplyR.Decrypt(tbReturn.Data[i]["book"]), tbReturn.Data[i]["id"]);
end
end
end
Or if she search's for a writer and only remebers the first name I can get it to search the right parts just not do a partial search any ideasTags: None
Leave a comment: