$cek=mysql_query('SELECT Header FROM CompletedHotelProjects LIMIT'.$count.', '.$count+2);
When I write this query, it fails. Can you help me, how can I write the right syntax?
Thanks...
$cek=mysql_query('SELECT Header FROM CompletedHotelProjects LIMIT'.$count.', '.$count+2);
When I write this query, it fails. Can you help me, how can I write the right syntax?
Thanks...
Try this:
$cek = mysql_query(
"SELECT Header FROM CompletedHotelProjects LIMIT ".$count.", ".($count+2).";"
);
Try this
$cek=mysql_query('SELECT `Header` FROM `CompletedHotelProjects` LIMIT '.$count.', '.$count+2);
EDIT: Maybe by adding the extra braces it will.
$cek=mysql_query('SELECT `Header` FROM `CompletedHotelProjects` LIMIT '.$count.', '.($count+2));
Always use `` signs to indicate a column or table and added a space between LIMIT and the first number.
Try this :-
$new_count = $count+2;
$cek=mysql_query('SELECT Header FROM CompletedHotelProjects LIMIT $count,$new_count');
Can you please try with below query,
$countEnd = $count+2;
$cek=mysql_query('SELECT Header FROM CompletedHotelProjects LIMIT'.$count.', '.$countEnd);
i think this will help you to find a way.