Home > Backend Development > PHP Tutorial > 这条sql语句有什么兼容有关问题吗

这条sql语句有什么兼容有关问题吗

WBOY
Release: 2016-06-13 13:41:28
Original
1078 people have browsed it

这条sql语句有什么兼容问题吗?
$query   =   "   select   *   from   $member_table   me1   left   join   (select   *,max(lead_date)   as   maxdate   from   $leada_table   group   by   user_id   order   by   lead_date)   temp   on   (me1.user_id   =   temp.user_id)   where   me1.islead   =   1   and   temp.maxdate  

这条sql语句有什么兼容问题吗?
本地测试通过,服务器上出错You   have   an   error   in   your   SQL   syntax.     Check   the   manual   that   corresponds   to   your   MySQL   server   version   for   the   right   syntax   to   use   near   'select   *,max(lead_date)   as   maxdate   from   haoshutong_leada_cn

本地mysql   4.1.21
服务器   MySQL   4.0.23

------解决方案--------------------
子查询4.0不支持,就是中间那个select

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template