Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 22nd, 2004, 01:55 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default Search on multi tables

Hi
I try to create search engine that can search on multi tables
for example
I have db called search
And I have those following tables
baby_items
 decoration
 photo_frames


I want to create search engine that can go to all those tables and give me some output

I used
 while(list($table) = mysql_list_tables(search))
 {
    $query = mysql_query("SELECT * FROM $table WHERE.....;
    and find match and output it
 }
but it has 2 problem
1. it is too slow.
2. and it did not give me any out put.

For those kind of search engine do i have to create a spider?

Thanks
Regards
Mani_he

 
Old November 22nd, 2004, 04:47 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

SELECT FROM baby_items, decoration, photo_frames WHERE......

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 23rd, 2004, 12:21 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks Snib
And can I use This Query or it is wrong
$query = mysql_query("SELECT * FROM bay_items, decoration,... WHERE special_price<>''")
I mean we always use equal, but now i used not equal. I wodering is wrong or right?

Thanks
Regards
Mani_he

 
Old November 23rd, 2004, 04:49 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

That is correct syntax.

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 23rd, 2004, 09:07 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks snib

Regards
Mani_he






Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi column search and compare luxcs Excel VBA 1 November 16th, 2006 02:45 PM
Multi-Column Array Search RollingWoodFarm Excel VBA 5 August 1st, 2006 06:45 PM
How do I search a database with 4 tables from VB 6 Szimmer9 VB How-To 6 March 23rd, 2006 10:56 AM
Bind a grid from multi tables? hany ASP.NET 1.0 and 1.1 Professional 2 January 22nd, 2006 11:26 AM
Multi tables in the crystal report? lovelylife1982 Crystal Reports 1 March 11th, 2005 04:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.