خرید بک لینک

Vote count: 0

I'm trying to run a query in GOLANG using QueryRow as I only need one row but it keeps spitting out an error of:

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL se rver version for the right syntax to use near 'set @accID = (select id from table2); INSERT IGNORE INTO task(task, accou' at line 8

Here's my query:

CREATE TEMPORARY TABLE table2 AS(
    SELECT accounts.id, useame, password, guid, devid, phoneid, proxy.ip, proxy.port
    FROM accounts
    LEFT JOIN proxy ON proxy.id = accounts.proxy_id
    WHERE NOT EXISTS (SELECT taskID FROM task WHERE task.TaskID= "234" AND accounts.id = task.account_id) AND accounts.status = 1
    ORDER BY RAND()
    LIMIT 1);
    set @accID = (select id from table2);
    INSERT IGNORE INTO task(taskID, account_id)
    VALUES ("234", @accID, "123213");
    select * from table2;

Ruing the above query in phpmyadmin query box works and spits out one row but ruing in golang gives me the above error. Anyone know why?

asked 56 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 12 تير 1395 ساعت: 7:44

صفحه بندی