如何在 Volusion API 中编写连接查询 [英] How to write join query in Volusion API

查看:23
本文介绍了如何在 Volusion API 中编写连接查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 PHP 应用程序,它连接到 Volusion 使用查询字符串存储和导出数据,API 中的查询字符串如下

I have a PHP application which connects to Volusion store and exports data using query string, and the query string in API like following

$url="http://www.domain.com/net/WebService.aspx?Login=jusername&EncryptedPassword=7602B3272D929D17B5138382F2AE4F4C6102A12AEB1F476293C16A5F731949B6&EDI_Name=Generic\Customers&SELECT_Columns=CustomerID,LastLogin";

现在我想从多个表中获取数据,我的查询就像

Now I want to fetch data from multiple tables and my query is like

SELECT Customers.CustomerID, Customers.FirstName, Customers.LastName, Customers.CompanyName, Customers.EmailAddress, Login_History.LastModified  FROM Customers JOIN Login_History ON (Login_History.CustomerID=Customers.Customerid)

有谁知道如何在 Volusion API 连接 URL 中编写 JOIN 查询?

Does anyone know how to write JOIN query in Volusion API connection URL?

推荐答案

使用记事本或类似的编辑器将以下内容复制并粘贴到其中,并将其另存为 loginhistory.sql 或您想要的任何内容,但它必须具有 .sql 扩展名.

Using notepad or similar editor copy and paste the following into it and save it as loginhistory.sql or whatever you want but it must have an .sql extension.

 SELECT Customers.CustomerID, Customers.FirstName, Customers.LastName, Customers.CompanyName, Customers.EmailAddress, Login_History.LastModified  FROM Customers JOIN Login_History ON (Login_History.CustomerID=Customers.Customerid)

这会起作用,但肯定格式不正确.我会把它留给你写一个 XSD 文件.将以下内容复制到记事本等编辑器,并使用与上述相同的名称但扩展名为 .xsd 进行保存.

This will work but certainly not correctly formatted. I'll leave it to you on writing a XSD file. Copy the following to a editor like Notepad and save it with the same name as above but with a .xsd extension.

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
</xs:schema>

将上述两个文件通过 FTP 传输到您的 Generic 文件夹.

FTP the two files above to your Generic folder.

/v/vspfiles/schema/Generic/

您现在可以使用 URL 通过 API 运行 SQL 查询

You can now run the SQL query via the API using the URL

http://www.yourdomain.com/net/WebService.aspx?Login=username&EncryptedPassword=abcdefghijklmnopqrstuvwxyz&EDI_Name=Generic\loginhistory

请务必在 URL 中编辑您的特定 API 凭据.

Be sure to edit in your specific API credentials in the URL.

这篇关于如何在 Volusion API 中编写连接查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆