如何选择具有不同表的表值和where子句

时间:2017-08-22 18:25:38

标签: php mysql

我想问一下php查询。我想在那里选择一个带有where子句条件的数据。在第一个查询中,我选择了表(date between $a and $b) and kode=$c and user='Borongan'中的所有数据,条件为kode。在那些查询中我得到了我的所有数据。我的问题是我要将数据wjm中的数据name更改为数据material中的kode。对于我需要一个where子句的更改,并检查我从wjm获取的数据中的material值,然后检查条件为select nama from where kode='the code that i get from wjm'的表wjm table is like this

我为SELECT * FROM wjm WHERE (date BETWEEN '$date_awal' and '$date_akhir') AND kode ='$kode' AND uses='Borongan' ORDER by no asc

所做的查询

SELECT nama FROM material where kode='the code that i got from wjm'

我想用我从该查询得到的kode再次在其中进行选择。我想做的查询

import os import glob import pandas as pd mask = r'/path/to/*.jpg' jpgs = [os.path.split(f)[1] for f in glob.glob(mask)] imagenames = pd.read_csv('file.csv',usecols=['image_name'],squeeze=True) print(imagenames[imagenames.isin(jpgs)])

我可以做那样的事。我的意思是它可以做那样的事情吗?

0 个答案:

没有答案
相关问题