<?php
$database2 =& JFactory::getDBO();
$query3 = "SELECT COUNT(*) FROM #__chronoforms_gastenlijst WHERE cf_user_id = '63'";
$database2->setQuery($query3);
$row2 = $database2->loadObject();
echo $database2->getErrorMsg();
echo $row2->COUNT(*);
?>the query works in phpmyadmin, it just doesn't show me anything in php. is there anything wrong with my code?
Thanks
Hi tnijman,
Try this
Bob
PS Why $database2?
Try this
<?php
$database2 =& JFactory::getDBO();
$query3 = "SELECT COUNT(*) FROM #__chronoforms_gastenlijst WHERE cf_user_id = '63'";
$database2->setQuery($query3);
if ( !($row2 = $database2->loadResult()) { // you will only get a single result
echo $database2->getErrorMsg();
}
echo $row2;
?>Bob
PS Why $database2?
I put the code you gave me in the header of a chronoformconnection. The onlything it displays is the loop without any styling. Without the table I made it in. Any suggestions?
Thanks!
PS I didn't know what the problem was at first point: when I made another server connection it filtered things out. At that point I renamed some variables and it worked.. That's the reason.
Thanks!
PS I didn't know what the problem was at first point: when I made another server connection it filtered things out. At that point I renamed some variables and it worked.. That's the reason.
Hi tnijman,
There's no table code in this thread so I really don't know what you are asking??
Bob
There's no table code in this thread so I really don't know what you are asking??
Bob
This topic is locked and no more replies can be posted.
