, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Searchable directory?

FlexCMS Support Forum


Searchable directory?
Started July 6, 2008 @ 8:14am by cbc58
Post Message 
cbc58


Posts: 15
 
Searchable directory?July 6, 2008 @ 8:14am
Is it possible to set up a searchable directory of members by state, city and/or zipcode or other fields?
 
DCSun
Administrator



Posts: 625
 
July 6, 2008 @ 4:44pm
That should be possible and not overly complicated. Everything you'll need should be located in the core-Users table.

If only you wanted to search through users for a specific purpose, you could use something like PHPMyAdmin to just access that database table and run searches on it based on your own criteria. For visitors to your site to access that, you could modify the code in the inc-core-admin-users.php file.


David


FlexCMS v3.2 Has Been Released!
 
Wolf




Posts: 65
 
July 12, 2008 @ 11:55pm
I did something similar to that in one of my Flex applications. I disabled fields in the users record so the user doesn't see the data when editing the record, but can see it in a query.

1. Made a regular flex page
2. Added this code
3. Set to process php code
4. Display the page



Code

$message = "";
if (!isset($block)){
$message = "List neighborhood watch block houses [home = block 23].";
} elseif ($block < 1){
$message = "Error: block number [$block] cannot be less than 1";
} elseif ($block >100){
$message = "Erorr: block number [$block] cannot be greater than 100";
} else {
$message = "Searching for BLOCK NUMBER [$block]";
}

print '<div>MainURL=['.$MainURL.']</div>';
?>

<form action="<?php print $MainURL; ?>/pages/test_block_query.html" method="POST">
Type block number here: <input type="text" name="block">
</form

<?PHP
$query55="SELECT * FROM `"."core-Users` WHERE Custom2 = "."\"Block $block\" order by `Custom1` asc, `Address2` asc, `Address1` asc";

print '<div>MainURL=['.$MainURL.']</div>';
print '<div><b>'.$message.'</b><br><br></div>';
print '<div>'.$query55.'</div>';


$result55 = mysql_query($query55) or die (mysql_error());

if (mysql_num_rows($result55) > 0)
{
print '<div>mysql_num_rows = '.mysql_num_rows($result55).'</div><br>';

while ($row55 = mysql_fetch_array($result55))
{
print $row55['Custom1'] .', ';
print $row55['Custom2'] .', ';
print $row55['Address1'] .' ';
print $row55['Address2'] .' ';
print $row55['Address3'] .', ';

print $row55['FirstName'] .' ';
print $row55['LastName'] .', ';
print $row55['Email'] .', ';
print $row55['Phone'] .'<br>';


$row55_custom1 = $row55['Custom1']; // save section number
}
};


Hope it gets you started!

Would love to see your code when you finish.Smile

Wolf
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.09864 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS