User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,625 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,495 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:

URGENT: Implementing search with multiple dissimilar MySQL tables

Join Date: May 2006
Posts: 2
Reputation: abhishekgoogle is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abhishekgoogle abhishekgoogle is offline Offline
Newbie Poster

Help URGENT: Implementing search with multiple dissimilar MySQL tables

  #1  
May 8th, 2006
Hi,

This is Abhishek. I am a newbie in PHP and we have to develop an Inventory management application. We have a MySQL database structure which looks like this (dissimilar)

VORTEX

Table 1: hardware
==========================================
hwid | total | manufacturer | hardware type | model no | specs | remarks|
==========================================

Table 2: assetserial
===========================================
assetid | serialnum | hwid
===========================================

Table 3: assetowner
============================================
assetid | username | locid
============================================

Table 4: userloc
=============================================
username | locid | country | city | site | cubicle |
=============================================

I have to implement search facility in this database wherein the user interface will just contain a text box wherein he types a string and fetch complete details from the database.

For eg: If someone searches for "abhishek" it must search for abhishek in all the tables and suppose it finds abhishek in the "userloc" table then it should be able to display abhishek's location from userloc, what assets abhishek possesses from assetowner, what are the serialnumbers of those assets fom assetserial and what are the hardware types of those assets (i.e. monitors/desktops/workstations...etc..) from the hardware table.

I dunno how to link the tables because they are dissimilar and also the fact that fields like username, locid,hwid etc are repeated in the 4 tables... so even if I actually search in each table it might find multiple instances of abhishek in userloc and assetowner....


Please help!!! Thanks in advance

Abhishek
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 8:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC