简体   繁体   English

如何将SQL数据增益从php脚本发送到python脚本?

[英]How to send SQL data gain from a php script to a python script?

I'm struggling with a question. 我在想一个问题。 So I created a Neural Network, but now I want to put values from my database in it. 因此,我创建了一个神经网络,但是现在我想将数据库中的值放入其中。 It's important that the data from the database is collected by a php script (already created), and has been send to my python Neural Network script. 重要的是,来自数据库的数据是由php脚本(已创建)收集的,并已发送到我的python Neural Network脚本中。 How do I transfer multiple variables and even multiple rows from my database to a python script? 如何将多个变量甚至多个行从数据库传输到python脚本?

Best way to share data is via API. 共享数据的最佳方法是通过API。 Prepare array containing multiple data you want to send then convert the data to JSON. 准备包含要发送的多个数据的数组,然后将数据转换为JSON。 On python, decode the JSON then take data out of it one by one. 在python上,对JSON进行解码,然后一一取出数据。 Hope this answers your question. 希望这能回答您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM