我在SELECT部分中编写了一个带有子查询的语句,但是我得到了以下错误消息(从Codeigniter返回):
您的SQL语法出现错误;请检查与您的MySQL服务器版本对应的手册,以获得使用near‘的正确语法(从product_selects中选择ps_id = '1'),在第1行选择psc_opt_2 A
`psc_opt_1` AS (SELECT `ps_url_name` WHERE `ps_id` = '2'),
`psc</
我已经有了作业数据库,在那里我尝试获得与给定项目编号的'ProjectId‘或'ProjectScopeChangeID’相关的所有‘MySQL’条目。是一对多关系,所以project没有任何关于PSC的列。另外,如果我想获得PSC的所有工作,我会使用:psc.projectScopeChangeID,projectscopechange psc,
plan
$sql_total_money = "SELECT SUM(Money) as TotalMoney FROM accounts WHERE Program='PSC' BranchId='13' andExamYear='2013'";
$result_total_money=mysql_query($sql_total_money,$link)or die($sql_total_money."<br/><br/>&quo
| 0.01SELECT period, loan_sum, covers, delay (SELECT MAX(EXTRACT(YEAR_MONTH FROM psc.datepayment_schedule_row AS psr2 WHERE psr.payment_schedule_id = psr2.payment_schedule_id) AS loan_sum,
(SELECT SUM(psc2.sum) FROM payment_schedule_cover AS psc2 WHER