Jump to content

siddiquip

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

siddiquip's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi ,I have the following two tables Files,FileFiles the definitions for which are as follows DROP TABLE IF EXISTS `FileFiles`; CREATE TABLE `FileFiles` ( `Parent_Id` int(11) NOT NULL default '0', `Include_Id` int(11) NOT NULL default '0', PRIMARY KEY (`Parent_Id`,`Include_Id`) ) TYPE=InnoDB CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*Data for the table `FileFiles` */ insert into `FileFiles`(`Parent_Id`,`Include_Id`) values (21,22),(22,23); /*Table structure for table `Files` */ DROP TABLE IF EXISTS `Files`; CREATE TABLE `Files` ( `File_Id` int(11) NOT NULL auto_increment, `File_Type` tinyint(4) NOT NULL default '0', `File_Name` varchar(255) default NULL, `File_Version` varchar(255) default NULL, `File_Info` varchar(255) default NULL, `File_Server` int(11) default NULL, `File_Location` varchar(255) default NULL, PRIMARY KEY (`File_Id`), UNIQUE KEY `File_Name` (`File_Name`,`File_Server`,`File_Location`) ) TYPE=InnoDB CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC; /*Data for the table `Files` */ insert into `Files`(`File_Id`,`File_Type`,`File_Name`,`File_Version`,`File_Info`,`File_Server`,`File_Location`) values (1,1,'alcatel_osos_WMRM.props',NULL,NULL,3,'/opt/Omnibus/tsm/solaris2'),(2,1,'alcatel_osos_NZLRM.props',NULL,NULL,3,'/opt/Omnibus/tsm/solaris2'),(3,1,'lucent_g2itm1_sc.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(4,1,'lucent_g2itm2_sc.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(5,1,'mv36_ZEM1.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(6,1,'mv36_ZEM2.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(7,1,'mv36_ZEM3.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(8,1,'mv36_ZEM4.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(9,1,'mv36_NWAEM1.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(10,1,'mv36_NWAEM2.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(11,1,'mv36_NWAEM3.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(12,1,'mv36_NWBEM1.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(13,1,'mv36_NWBEM2.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(14,1,'mv36_NWBEM3.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(15,1,'mv36_NOEM1.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(16,1,'mv36_NOEM2.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(17,1,'mv36_NOEM3.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(18,1,'mv36_MEM1.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(19,1,'mv36_MEM2.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(20,1,'mv36_MEM3.props',NULL,NULL,3,'/opt/Omnibus/probes/solaris2'),(21,2,'mttrapd.rules',NULL,NULL,3,NULL),(22,3,'mttrapd.include.rules',NULL,NULL,3,NULL),(23,4,'mttrapd.lookup',NULL,NULL,3,NULL),(24,2,'huwaei.rules',NULL,NULL,3,NULL),(25,2,'mm.rules',NULL,NULL,3,NULL); ######################################################################## I have to build a page using php for files which will show all the files in the table files .Now it should be such that when i select a file and if its file_id is present in the FileFiles table (ie either parent_id or include_id) the file name should be shown from the files table with subsequently all files in hierarchy . ie if 21 is selected then it should on clicking 21 show 22 which on subsequent clicking should show 23. similarly this should repeat for files 22 and 23 as follows 21 <-22->23 and 23->22->21 how can this be achieved .......any help is appreciated please guys help me
  2. Hello guys, can nobody in this forum give me an idea of how to achieve this ???. An idea of any sort will be grateful
  3. Hi, I would be grateful if anybody can help me ........this is driving me crazy ???. I have two tables Files and FileFiles. The file Table stores information about the files in the table with File_Id as the primary key and File_Type as the type field indicating the type of files(it can hav values 1,2,3,4) The FileFiles tables contains the relations between files with two fields parent_id and include_id (both primary keys) .Now if a file having file_id as 21 is using file having file_id 22 which in turn uses file having file_id 23 the filefiles table is filled as follows parent_id include_id 21 22 22 23 The thing is that files having file_type as 1 will not include any files as 2 will include files having type 3 /4 or both as 3 can have files having type 3/4 or both as 4 will not include any files now in the main page of files whenever i select any file ( having any type and id ) it should show me any connections it is having to all the files in a hierarcy like if i select 23 then it should show me 23->22->21in a drill down fashion similarly if i select 21 it should give me connctions as 21->22->23 similarly if 22 is selected the selection should be as 21<-22->23 i want to implement the code in php.Also can this be implemented in mysql directly.i'm using mysql 4 any help would be great thanks in advance
  4. Thanks .........i'll start as suggested
  5. thanks for the reply...............can u suggest some good books for php as well as php/mysql web development that i purchase to be used as a reference .Also if u can pleas tell me whether it is useful to use some code generators (phpmyedit,phpmaker) to create initial draft ,such that they can be modified later for my convenience according to my needs Thanks in advance
  6. actually i am not an expert in php .but know only OOPS,Core-java,C++,and shell scripting
  7. Hello i am a newbee ::)to php/mysql and i want to build a data driven website using php/mysql having sevent tables in the database. i want to have an interface such that the user is able to add,delete,update data from any of the database .also the website should have a feature such that the user will be able to see the relationships in a drill down manner .I have created the initial interface using phpmaker but i am stuck now and cannot proceed .any help would be great . Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.