InvestorsHub Logo
Followers 5
Posts 1330
Boards Moderated 1
Alias Born 12/18/2001

Re: Bob Zumbrunnen post# 875

Wednesday, 12/15/2004 6:50:00 AM

Wednesday, December 15, 2004 6:50:00 AM

Post# of 985
Bob,

sure it has time to implement. Good things need time. smile

Unfortunately I don't know ASP and IHub scripting so well as to quickly pull out the necessary code here for. But I've done it for PHP/SQL and there it is quite easy. Something like this for the search display page if it helps:

$search = $_POST['search'];
$page = $page+0;

$result = mysql_query( "SELECT messageid FROM ihub WHERE name like \"%$search%\" or text like \"%$search%\" order by entrytime LIMIT $page, 10" )
or die("SELECT Error: ".mysql_error());

while ($get_id = mysql_fetch_array($result, MYSQL_ASSOC)){

$result2 = mysql_query( "SELECT name, text FROM ihub WHERE messageid=\"%$get_id%\" " )
or die("SELECT Error: ".mysql_error());
while ($search = mysql_fetch_array($result2, MYSQL_ASSOC)){
print "$search[name], $search[text]";
}
}

$page = $page+10;


of course the code is incomplete..
and so on, the basic idea, two database searches on the searchdisplaypage, the first searches all message id where string was found. the second prints the text of all idresults limited to 10 per page.

greets

s.



Join InvestorsHub

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.