4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
热卖商品
新闻详情
我想将Consolibyte PHP QuickBooks库与PDO一起使用-PHP开发-CSDN...
来自 : CSDN技术社区 发布时间:2021-03-25
\'authenticate\' = \'_quickbooks_custom_auth\', //\'authenticate\' = \'_QuickBooksClass::theStaticMethod\', \'deny_concurrent_logins\' = false, if (!QuickBooks_Utilities::initialized($dsn)){ // Initialize creates the neccessary database schema for queueing up requests and logging QuickBooks_Utilities::initialize($dsn); // This creates a username and password which is used by the Web Connector to authenticate QuickBooks_Utilities::createUser($dsn, $qbwc_user, $qbwc_pass); // Create our test table mysql_query(\"CREATE TABLE `customers` ( `id` int(10) unsigned NOT NULL, `name` varchar(64) NOT NULL, `company_name` varchar(64) NOT NULL, `fname` varchar(64) NOT NULL, `lname` varchar(64) NOT NULL, `addr1` varchar(64) NOT NULL, `addr2` varchar(64) NOT NULL, `city` varchar(64) NOT NULL, `state` varchar(64) NOT NULL, `postal_code` varchar(20) NOT NULL, `country` varchar(64) NOT NULL, `phone` varchar(24) NOT NULL, `email` varchar(64) NOT NULL, `quickbooks_listid` varchar(255) DEFAULT NULL, `quickbooks_editsequence` varchar(255) DEFAULT NULL, `quickbooks_errnum` varchar(255) DEFAULT NULL, `quickbooks_errmsg` varchar(255) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM\"); * Authenticate a Web Connector sessionfunction _quickbooks_custom_auth($username, $password, $qb_company_file){ if ($qbwc_user == \'Admin\' $qbwc_pass== \'xxxxxx\'){ // Use this company file and auth successfully $qb_company_file = $qb_file_name; return true; // Login failure return false;

The updated conn_qb.php code:

try { global $db; $db = new PDO(\"mysql:host=localhost;dbname=xxxxxx_site_1\", \"xxxxxxxx_user\", \"xxxxxxxxxxxxxx\"); $db- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db- setAttribute(PDO::ATTR_EMULATE_PREPARES, false);}catch(PDOException $e) { error_log($errorLogPrefix.$e- getMessage().\"\",3,\"PDOErrors.log\"); //throw $e;try { global $dbMain; $dbMain = new PDO(\"mysql:host=localhost;dbname=xxxxxx_main\", \"xxxxxx_user\", \"xxxxxxxxxxxxxxxxx\"); $dbMain- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbMain- setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

本文链接: http://quickbooksphonenum.immuno-online.com/view-771383.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616