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

查看:92
本文介绍了如何在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扩展名. /p>

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传输到您的通用文件夹.

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天全站免登陆