faustf Posted May 22, 2013 Share Posted May 22, 2013 hi guy i wanna do a select in thunderbird db for grab only a specific mail for discriminate the mail i use a address email compleate myname@gmail.com but give me some error this is a code $Db_mail = _SQLite_Open($percorso_mail_DB) _SQLite_GetTable2d($Db_mail,"SELECT * FROM messagesText_content WHERE c3author = "& $mail_find&";", $aRow, $iRows, $iCols) MsgBox(0,'body?',$aRow[1][1]) _SQLite_Close($Db_mail) _SQLite_Shutdown() this is a erorr code --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop ! SQLite.au3 Error --> Function: _SQLite_Query --> Query: SELECT * FROM messagesText_content WHERE c3author =Sara Olivari <sara.olivari@runner.it>; --> Error: near "Olivari": syntax error C:UsersstefanoDocumentsprogrammazioneSANDRO GESTsandro-gest.au3 (321) : ==> Subscript used with non-Array variable.: MsgBox(0,'body?',$aRow[1][1]) MsgBox(0,'body?',$aRow^ ERROR if i use a id table go correct but i dont can discriminate the mail Link to comment Share on other sites More sharing options...
faustf Posted May 22, 2013 Author Share Posted May 22, 2013 --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop ! SQLite.au3 Error --> Function: _SQLite_Query --> Query: SELECT * FROM messagesText_content WHERE c3author = eofficecom.com@gmail.com; --> Error: near "@gmail": syntax error Link to comment Share on other sites More sharing options...
kylomas Posted May 22, 2013 Share Posted May 22, 2013 faustf, Try it like this $Db_mail = _SQLite_Open($percorso_mail_DB) _SQLite_GetTable2d($Db_mail,"SELECT * FROM messagesText_content WHERE c3author = " & _sqlite_fastescape($mail_find) & ";", $aRow, $iRows, $iCols) MsgBox(0,'body?',$aRow[1][1]) _SQLite_Close($Db_mail) _SQLite_Shutdown() kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
faustf Posted May 22, 2013 Author Share Posted May 22, 2013 o thankz kylomas you aare the best i know , perfect Link to comment Share on other sites More sharing options...
jchd Posted May 22, 2013 Share Posted May 22, 2013 One thing to be aware of when dealing with SQLite3 DBs created by third-party software (FireFox, Thunderbird, Adobe and so many others): you have no guaranty that the SQLite library (either linked in or as DLL) these programs use is compiled with options compatible with the version that comes along with AutoIt. Also many of they use internal extensions(functions, collations, VFS, ...) overloading standard ones. Also you never know when a specific DB design is planned to be used in particular ways. To keep things safe you should refrain to write to those DBs (unless the third-party says it is safe) and prefer usage of the sqlite3.dll that generally comes with each such program. For instance FireFox uses a customized version and a non-standard name for the dll. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
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