Sign in to follow this  
Followers 0
slaughter

Confused with SQL

4 posts in this topic

SQL

UPDATE `kalendoriusdb` SET `Skirta` = 'Migle' AND `Data` = '2007/10/26' AND `Laikas` = '07:00' AND `Kiekis` = '3' AND `Veiksmas` = 'MAINŲ SUTARTIS' AND `Salys` = 'fh' AND `Kontaktai` = '' AND `Pastabos` = '' AND `Darbuotojas` = 'Ed A' WHERE `Skirta` = 'Migle', `Data` = '2007/10/26', `Laikas` = '07:00', `Kiekis` = '3', `Veiksmas` = 'MAINŲ SUTARTIS', `Salys` = 'fh', `Kontaktai` = '', `Pastabos` = '', `Darbuotojas` = 'Jlija enė';

Whith tis sql line I get error

Return $oConnectionobj.execute ($sQuery) 
Return $oConnectionobj.execute ($sQuery)^ ERROR
Error in my_thread_global_end(): 2 threads didn't exit

By the way how to remove this error on exiting GUI

Error in my_thread_global_end(): 2 threads didn't exit

I use function

Func SQL_GO($sqld)

FileWriteLine(FileOpen("log.txt", 1), $sqld&@CRLF)

dim $darbuotojairr[300]

$sql = _MySQLConnect("xxx","xxx","xxxx","xxx.com")

If @error Then

MsgBox(1, "error","Mysql con error 1. Contact administrator.")

Exit(1)

EndIf

$var = _Query($sql,$sqld)

_MySQLEnd($sql)

Return $var

EndFunc

Where I made mistake :/

Wery tired... writed 1000+ lines :/

Share this post


Link to post
Share on other sites



Similar error text in another topic. In that case, it appeared to be a lack of error checking which lead to attempts to use objects that had not been properly retrieved yet. Are you sure your connection object ($oConnectionobj) is good before you get to this line of code?

Might want to test it with IsObj().

<_<


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I'm more familiar with MySQL but your query doesn't look right.

Your code:

UPDATE `kalendoriusdb`

SET `Skirta` = 'Migle' AND `Data` = '2007/10/26' AND `Laikas` = '07:00' AND `Kiekis` = '3' AND `Veiksmas` = 'MAINŲ SUTARTIS' AND `Salys` = 'fh' AND `Kontaktai` = '' AND `Pastabos` = '' AND `Darbuotojas` = 'Ed A'

WHERE `Skirta` = 'Migle', `Data` = '2007/10/26', `Laikas` = '07:00', `Kiekis` = '3', `Veiksmas` = 'MAINŲ SUTARTIS', `Salys` = 'fh', `Kontaktai` = '', `Pastabos` = '', `Darbuotojas` = 'Jlija enė';

MySQL:

UPDATE `kalendoriusdb`

SET `Skirta` = 'Migle', `Data` = '2007/10/26', `Laikas` = '07:00', `Kiekis` = '3', `Veiksmas` = 'MAINŲ SUTARTIS', `Salys` = 'fh', `Kontaktai` = '', `Pastabos` = '', `Darbuotojas` = 'Ed A'

WHERE `Skirta` = 'Migle' AND `Data` = '2007/10/26' AND `Laikas` = '07:00' AND `Kiekis` = '3' AND `Veiksmas` = 'MAINŲ SUTARTIS' AND `Salys` = 'fh', `Kontaktai` = '' AND `Pastabos` = '' AND `Darbuotojas` = 'Jlija enė';

MySQL Alternative:

UPDATE `kalendoriusdb`

SET (`Skirta`,`Data`,`Laikas`,`Kiekis`,`Veiksmas`,`Salys`,`Kontaktai`,`Pastabos`,`Darbuotojas`) VALUES ('Migle','2007/10/26','07:00','3','MAINŲ SUTARTIS','fh','','','Ed A')

WHERE `Skirta` = 'Migle' AND `Data` = '2007/10/26' AND `Laikas` = '07:00' AND `Kiekis` = '3' AND `Veiksmas` = 'MAINŲ SUTARTIS' AND `Salys` = 'fh', `Kontaktai` = '' AND `Pastabos` = '' AND `Darbuotojas` = 'Jlija enė';

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0