[eluser]Thorpe Obazee[/eluser]
[quote author="yudahebat" date="1244118049"]
Code:
[code]yudahebat - 04 June 2009 02:04 AM
I have a function that contain syntax like this
$query = $this->db->query('select * from reservasi where tgl_pesan between '2009-04-21'and '2009-04-25'');
foreach ($query->result() as $row)...
bacause it shows error
Code:
Parse error: syntax error, unexpected T_LNUMBER in C:\xampp\htdocs\CI2\system\application\views\cetak_data.php on line 19
Code:
$query = $this->db->query("select * from reservasi where tgl_pesan between "'" . 2009-04-21' and '" . 2009-04-25 . "'"); [/code]
I' fix my code like your code, but it shown error
Code:
Parse error: syntax error, unexpected '=' in C:\xampp\htdocs\CI2\system\application\views\cetak_data.php on line 19
whats wrong??[/quote]
Ermm.... take a look at my code again. You aren't escaping strings properly.