Is there error in my where syntax

akmt 28 Sep, 2010
Hello,

My Where SQL is;

WHERE 'cf_id' = <?php echo $_GET['is_arayan_id']; ?>


and my url is;

.../index.php?option=com_chronoconnectivity&connectionname=is_arayan_goster&is_arayan_id=3

I get no result in page.

Could you please tell me, is my where syntax is true?
GreyHead 28 Sep, 2010
Hi akmt,

You need back-ticks `` round the cf_id

I'd write it like this
<?php
$cf_id = JRequest::getInt('is_arayan_id', 0, 'get');
echo "WHERE `cf_id` = $cf_id " ;
?>


Bob
akmt 28 Sep, 2010
Thanks Dear Bob,

While I was waiting your answer, I did some exercises. And I solved the problem but I don't know how could be😀

My solution is;

WHERE cf_id = <?php echo $_GET['is_arayan_id']?>


There is no ticks or back-ticks.

But I understood that I will work very hard for advanced search form.

Thank you very much.
This topic is locked and no more replies can be posted.