Created
May 11, 2015 20:36
-
-
Save Uriel29/90b5062b98e847278444 to your computer and use it in GitHub Desktop.
Listar tudo que tem em uma coluna com PHP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$db = JFactory::getDBO(); | |
$query = ( 'SELECT bairro FROM `#__cck_store_form_article` ' ); | |
$db->setQuery($query); | |
$items = $db->loadObjectList(); | |
foreach ($items as $item) { | |
$bairro= $item->bairro; | |
echo $bairro; | |
} | |
//conta o numero de itens da coluna bairro | |
$n = count($items); | |
echo($n); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment