chirimbol Posted March 22, 2007 Posted March 22, 2007 Hi, I just begin using SQLite with autoIt and i have no problem when testing to create, insert or doing query with my database. Now my problem is I want to insert data in my database directly from variables (i.e. input from user), and I can't.... Here is my code below, of course this code insert $date in my database row and not the value of $date. How can I do to insert the real value of my Autoit variable. _SQLite_Exec -1, ("INSERT INTO mytable (date,text,rest) VALUES ('$date','Diligencia herederos sra sanchez','8');") Thanks for your help.
CrewXp Posted March 22, 2007 Posted March 22, 2007 hah. New to Autoit? Try this... $sqlstring="INSERT INTO mytable (date,text,rest) VALUES ('"&$date&"','Diligencia herederos sra sanchez','8');" _SQLite_Exec -1, ($sqlstring) The '&' signs (without single quotes), connects variables to strings, etc.
chirimbol Posted March 22, 2007 Author Posted March 22, 2007 Exactly what i want! Thanks. hah. New to Autoit? Try this... $sqlstring="INSERT INTO mytable (date,text,rest) VALUES ('"&$date&"','Diligencia herederos sra sanchez','8');" _SQLite_Exec -1, ($sqlstring) The '&' signs (without single quotes), connects variables to strings, etc.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now