热添加两个seperete表fealds到一个选择查询 [英] Hot add two seperete table fealds to one select query

查看:182
本文介绍了热添加两个seperete表fealds到一个选择查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用波纹管查询提取数据,它在执行后播下此错误。请帮我纠正这个问题。



错误:

I try to extract data using bellow query , it sow this error after execution . please help me to correct this query.

Error:

#1054 - Unknown column 'payments.date' in 'where clause' 





我的查询;





My query;

SELECT issue.bill_id as 'Bill id', items.i_code as 'Item code', issue.qtt as 'Qtt', issue.date as 'Date', issue.bill_serial as 'Bill number',issue.qtt*trip.h_price as 'Total' from issue INNER JOIN items ON issue.item_id=items.i_id INNER JOIN trip ON issue.bill_id=trip.bill_id AND issue.item_id=trip.item_id  WHERE issue.c_id=1 AND payments.date BETWEEN '2015-01-20 11:16:43' AND '2016-01-29 11:16:43'

推荐答案

付款表未在from子句中指定。
payments table not specified in your from clause.


这篇关于热添加两个seperete表fealds到一个选择查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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