Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]date_format not working
#11

[eluser]kikz4life[/eluser]
after i used this
Code:
$this->db->select("so_id as pkey, so_no, DATE_FORMAT(so_date,'%b %d, %Y'), e.data_display as type, b.customer_name, emp_name, net, ar_so.contact, k.data_display as status",FALSE);

Internal Server Error by firebug
Code:
<h1>A Database Error Occurred</h1>
        <p>Error Number: 1064</p><p>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 'FROM (`erp_ar_so`)
LEFT JOIN `erp_maint_customers` erp_b ON `erp_ar_so`.`client_' at line 2</p><p>SELECT `so_id` as pkey, `so_no`, DATE_FORMAT(so_date, `'%b` %d, `%Y')`, `erp_e`.`data_display` as type, `erp_b`.`customer_name`, `emp_name`, `net`, `erp_ar_so`.`contact`, `k`.`data_display` as status
FROM (`erp_ar_so`)
LEFT JOIN `erp_maint_customers` erp_b ON `erp_ar_so`.`client_id`=`erp_b`.`cust_id`
LEFT JOIN `erp_maint_customers` erp_c ON `erp_ar_so`.`del_client_id`=`erp_c`.`cust_id`
LEFT JOIN `erp_maint_employee` erp_d ON `erp_ar_so`.`salesman_id`=`erp_d`.`emp_id`
LEFT JOIN `erp_sec_dataset` erp_e ON `erp_ar_so`.`type_id`=`erp_e`.`data_id`
LEFT JOIN `erp_sec_dataset` k ON `erp_ar_so`.`status`=`k`.`data_value` AND k.data_code = "TRAN_STATUS"
WHERE `erp_ar_so`.`is_deleted` = '0'
ORDER BY `so_date` desc
LIMIT 15</p>

with alias it also says internal server error.,. grrR. xD


Messages In This Thread
[SOLVED]date_format not working - by El Forum - 10-26-2009, 12:23 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 12:45 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 12:54 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 01:04 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 01:16 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 02:08 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 02:11 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 02:40 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 03:27 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 03:31 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:01 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:13 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:17 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:25 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:29 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:30 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:31 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:46 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 04:55 AM
[SOLVED]date_format not working - by El Forum - 10-26-2009, 05:44 AM
[SOLVED]date_format not working - by El Forum - 10-30-2009, 01:25 AM
[SOLVED]date_format not working - by El Forum - 10-30-2009, 01:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB