0

我正在尝试安装http://prosper202.com(Azure 上的自托管脚本)

这是我所做的。

使用 MySQL 数据库创建了一个 Azure 网站。

配置的数据库登录凭据。

现在我收到此错误

您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 12 行的“AND 202_summary_overview.click_time < ANDlanding_page_id=0”附近使用正确的语法

SELECT 202_aff_campaigns.aff_campaign_id
    , aff_campaign_name
    , aff_campaign_payout
    , aff_network_name
FROM 202_summary_overview
LEFT JOIN 202_aff_campaigns USING (aff_campaign_id)
LEFT JOIN 202_aff_networks USING (aff_network_id)
WHERE 202_aff_networks.user_id = '1'
    AND 202_aff_networks.aff_network_deleted = 0
    AND 202_aff_campaigns.aff_campaign_deleted = 0
    AND 202_summary_overview.click_time >=
    AND 202_summary_overview.click_time <
    AND landing_page_id = 0
GROUP BY aff_campaign_id
ORDER BY 202_aff_networks.aff_network_name ASC
    , 202_aff_campaigns.aff_campaign_name ASC


Warning: Division by zero in C:\DWASFiles\Sites\click\VirtualDirectory0\site\wwwroot\202-config\functions-tracking202.php on line 1048 SELECT * FROM 202_sort_keywords LEFT JOIN 202_keywords ON (202_sort_keywords.keyword_id = 202_keywords.keyword_id) WHERE 202_sort_keywords.user_id='1' ORDER BY 202_sort_keywords.sort_keyword_clicks DESC LIMIT

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

我不知道解决这个问题。

我可以在不修改脚本的情况下使用 Azure SQL 代替 os MySQL 吗?

更远http://click.azurewebsites.net/tracking202/setup/aff_campaigns.php

给我这些错误

INSERT INTO `202_aff_campaigns` SET`aff_network_id`='1', `user_id`='1', `aff_campaign_name`='eDates', `aff_campaign_url`='http://googl.com', `aff_campaign_url_2`='', `aff_campaign_url_3`='', `aff_campaign_url_4`='', `aff_campaign_url_5`='', `aff_campaign_rotate`='0', `aff_campaign_payout`='0.9', `aff_campaign_cloaking`='1', `aff_campaign_time`='1355885344'

Field 'aff_campaign_id_public' doesn't have a default value

托管在这里http://prosper202.com/的相同脚本正在服务器上运行数千个。但它不适用于 Azure MySQL。

更多细节

 http://i.stack.imgur.com/SfhPs.png
4

2 回答 2

0

您需要为新用户在 user_pref 中添加一条记录...所以我只是将第一个用户记录复制到第二个并相应地更新 user_id。

CREATE TEMPORARY TABLE tmp SELECT * FROM 202_users_pref WHERE user_id = 1;
UPDATE tmp SET user_id=2 WHERE user_id = 1;
INSERT INTO 202_users_pref SELECT * FROM tmp WHERE user_id = 2;
DROP TABLE tmp;

希望这可以帮助某人

于 2013-04-05T06:28:16.353 回答
0

您没有提供与该列进行比较的值,

SELECT  ....
FROM    ....
WHERE   ....
    AND 202_aff_campaigns.aff_campaign_deleted = 0
    AND 202_summary_overview.click_time >=    // << error on this line
    AND 202_summary_overview.click_time <     // << also here
    AND landing_page_id = 0
于 2012-12-19T02:43:15.710 回答