[PHP-DB] Contact Database php_mysql
I am contemplating a Historical Database I barely can spel redundant let alone normalize so I am handicapped. The aim is to enter a name only once. I am studying linking tables. In the [Contact] idContact First_Name,Last_Name,Middle,Suffix,Full_Name,idCity,idState,City_State,i dZip_Code, Address_1,Address_2, [City] id Cityname id (al, ar etc) Statename [ZipCode] id Zip_Code Comment please, Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Contact Database php_mysql
Wow I'm amazed and thankful for such help and advice I thought I would attack this project piecemeal but that will not give a clear view that will allow helpful comment without the full view. I have a website at http://geocities.com/efoxfiles a labor of love So now it has become so detail intensive that I want to expand the scope to include all field sports with a Hunting...Foxhunting, Tree hunting Shooting Sports, Arena Sports...rodeos, horse events, 4H, all linking to Contact table Pedigrees...Hound,Whelping Date, Sire, Dam, Owner, Breeder... links to Contact Table/zip/city/state/address Timeline...back to Origin of each sportall linking to Contact Table Field Trial and Show Associations ...linking to Contact table So I did not present the true picture as I was assuming that I could piggyback all the tips and replicate them into a complete database. Practically all cities and zip codes may have to be in linking tables and the ID used in each categorySo I know just enough to get me in trouble. So reflecting what advice I have received to date: [Sportsmen] name to be registered of www ContactID FirstN,MidN,LastN,Suffix,Cityid,Stateid,Zip_Codepk,Addr1,Addr2,Other Cityid pk CityName Stateid pk Statename Assnid Assn (Associations) Trials/Showsid Trials/Show Houndsid Registry# /*Date to be a Timestamp?...reflecting mmdd001 to infinity refecting how many hounds born on that date*/ IFSB# SFSB# UKC# AKC# Whelping Date /*Is there such a thing as Dateid (linking table)*/ Sire (houndid) Dam (houndid) Owner (contactid) Breeder (contactid) Colorid (20+ color combinations) /*I have developed a CSS file that will display hound names in a heirarchial display to display a pedigree. My hope is to be able to use only the Sireid and Damid to present 5 generations???*/ /*I will have a large server thus excess capacity, php, mysql, pop3, mailing lists...maybe I can reward some of my helpers down the road*/ Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Contact Database php_mysql
w.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So reflecting what advice I have received to date: [Sportsmen] name to be registered of www ContactID FirstN,MidN,LastN,Suffix,Cityid,Stateid,Zip_Codepk,Addr1,Addr2,Other Cityid pk CityName Stateid pk Statename Assnid Assn (Associations) Trials/Showsid Trials/Show Houndsid Registry# /*Date to be a Timestamp?...reflecting mmdd001 to infinity refecting how many hounds born on that date*/ IFSB# SFSB# UKC# AKC# Whelping Date /*Is there such a thing as Dateid (linking table)*/ Sire (houndid) Dam (houndid) Owner (contactid) Breeder (contactid) Colorid (20+ color combinations) /*I have developed a CSS file that will display hound names in a heirarchial display to display a pedigree. My hope is to be able to use only the Sireid and Damid to present 5 generations???*/ Thanks for the advice So reflecting what advice I have received to date: Assuming that the Contact table would be used for: Owners, Breeders, Sportsmen, Ancestors, Associations, and a myriad of other categories of mankind, would the following normalization be prudent? ContactID FirstN,MidN,LastN,Suffix,Cityid,Stateid,Zip_Code_pk,Addr1,Addr2,Other Cityid pk CityName /*?? What about Norwood, MO...Norwood, MA*/ Stateid pk Statename Assnid Assn (Associations) Trials/Showsid Trials/Show Houndsid Hound Name Registry# /*Date to be a Timestamp?...reflecting mmdd001 to infinity refecting how many hounds born on that date*/ IFSB# SFSB# UKC# AKC# Whelping Date /*Is there such a thing as Dateid (linking table) ?*/ Sire (houndid) Dam (houndid) Owner (contactid) Breeder (contactid) Colorid (20+ color combinations) Colorid Colorname Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Error creating new table
>You can't have NOT NULL assigned to a text field. So...should it be maintext text NULL, or just maintext text ??? Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Create database
Newbie here, With PhpMyAdmin, What is the syntax for create database? I have: $link = mysql_pconnect("hostname", "username", "password") or exit("Could not connect"); if (mysql_create_db("Sportsmen")) { print ("Database created successfully\n"); } else { printf ("Error creating database: %s\n", mysql_error ()); } /*error Error MySQL said: You have an error in your SQL syntax near '$link = mysql_pconnect(\"64.177.44.120\", \"russgri\", \"sportsme\") or' at line 1 Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Configuring www.phpmyadmin/config.inc.php
Here is the code in config.inc.php $cfgServers[$i]['host'] = 'mydomain.com'; // MySQL hostname $cfgServers[$i]['port'] = ''; // MySQL port - leave blank for default port $cfgServers[$i]['socket']= ''; // Path to the socket - leave blank for default socket $cfgServers[$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket') $cfgServers[$i]['controluser'] = 'username'; // MySQL control user settings // (this user must have read-only $cfgServers[$i]['controlpass'] = 'password'; // access to the "mysql/user" // and "mysql/db" tables) $cfgServers[$i]['auth_type'] = 'config';// Authentication method (config, http or cookie based)? $cfgServers[$i]['user'] = ''; // MySQL user $cfgServers[$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) $cfgServers[$i]['only_db'] = 'database_name'; // If set to a db-name, only // this db is displayed // at left frame Is controluser and control password the username and password of the domain? (ftp user/pass???) Is user and password the user and password of the Mysql database_name? Should config.inc.php be chmod 666 Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PhpMyAdmin's File Manager and apps
Where are the downloads for these apps? Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Breeders database
Here is the kernel ...What other attributes/indexes in the table would I need to generate a 5 generation pedigree...I am still trying to find those queries. # Host: localhost Database : hounds # # # Table structure for table 'hound' # DROP TABLE IF EXISTS hound; CREATE TABLE hound ( id bigint(21) NOT NULL auto_increment, name varchar(100) NOT NULL, PRIMARY KEY (id) ); # # Dumping data for table 'hound' # # # # Table structure for table 'parent' # DROP TABLE IF EXISTS parent; CREATE TABLE parent ( id bigint(21) NOT NULL auto_increment, sireid bigint(21) DEFAULT '0' NOT NULL, damid bigint(21) DEFAULT '0' NOT NULL, PRIMARY KEY (id) ); # # Dumping data for table 'parent' # Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Create database phpHoo\p\g
I was looking at PhpHoo 'yahoo-like directory' What is the \p\g appended to the code mean? I was thinking about using this...just don't understand how to implement the appendages. create database phpHoo\p\g use phpHoo\p\g create table Categories ( CatID bigint(21) NOT NULL auto_increment, CatName varchar(32) NOT NULL, CatParent bigint(21), PRIMARY KEY (CatID), UNIQUE (CatName) )\p\g Russell Griechen htttp://sportsmenafield.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] table naming issues
Does anyone have any table-naming systems to keep tables grouped so that they will be more readily available in PhpMyAdmin's left column? maybe 001_contacts and 002_users for large databases supporting a CMS Russell Griechen htttp://sportsmenafield.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PhpHoo_create database phpHoo\p\g
I was looking at PhpHoo 'yahoo-like directory' What is the \p\g appended to the code mean? I was thinking about using this...just don't understand how to implement the appendages. create database phpHoo\p\g use phpHoo\p\g create table Categories ( CatID bigint(21) NOT NULL auto_increment, CatName varchar(32) NOT NULL, CatParent bigint(21), PRIMARY KEY (CatID), UNIQUE (CatName) )\p\g Russell Griechen htttp://sportsmenafield.com Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Noob questions...
Try this http://www.mydomain.com/phpmyadmin/ and be ready with your password. Russell Griechen > You should ask if your ISP has not already installed a phpMyAdmin that you > can use - save you the bother. > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Is this a transposition
Are tables able to be indexed? How should the key be applied here? This is from Jay Greenspan's great Mysql/Php book. I looked for error disclaimers. I think it us just transposed ??? Is this a typo? In primary and key indexes " key stage _user_map_key " drop table if exists user_stage_map ; create table user_stage_map ( user_id integer not null, stage_id integer not null, primary key user_stage_map_key (user_id,stage_id ), key stage_user_map_key (stage_id) ); Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Pedigree question
I need to develop a tree-like pedigree of animals up to 5 generations. I know there are other attributes to the animal; but do I need anyother tables...assuming that I can develop all the code to generate these ancestors. I have developed a CSS positioning code that will place these results in a neat 5 generation tree. Is there any other alternatives? Animal ID Name Foal ID SireID DamID Russell Griechen htttp://sportsmenafield.com Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Pedigree question
Mihail Bota" <[EMAIL PROTECTED]>wrote: > Yes, there are. There is a pretty good php code, called HTML Tree which > can make trees, dynamically. I did a search in the Php Manual...but did not understand what I was looking at. http://www.php.net/manual/sv/printwn/ref.domxml.php I will look closer...Is this the link you were referring to. > Regarding the coding itself...you can have a simple table that records who > is ancestor of who. This is a solution. Another one, which is not so neat > is to create a table with 5 columns...one per generation. > Does this make sense? I must only enter an animal once ...and I want to have users update the database...sort of a DMOZ directory...with an editor/moderator approach for the different breeds/animals. I would like to have someone comment on whether the 2 tables mentioned would suffice and what functions...or code would be better to apply. Michael Koifler sp? in a book is purported to have a solution for heirarchical display...but I am over budget now on this project so if any one has seen this book and could help I would appreciate the code...until I can afford the book. see the tables in the original post below. Russell Griechen htttp://sportsmenafield.com > On Sun, 6 Oct 2002, Russell Griechen wrote: > > > I need to develop a tree-like pedigree of animals up to 5 generations. > > I know there are other attributes to the animal; but do I need anyother > > tables...assuming that I can develop all the code to generate these > > ancestors. > > I have developed a CSS positioning code that will place these results in a > > neat 5 generation tree. > > Is there any other alternatives? > > > > Animal > > ID > > Name > > > > Foal > > ID > > SireID > > DamID -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Pedigree question
Thank you for your response. see comments below... - Original Message - From: "Matt Neimeyer" <[EMAIL PROTECTED]> > >I need to develop a tree-like pedigree of animals up to 5 generations. > >I know there are other attributes to the animal; but do I need anyother > >tables...assuming that I can develop all the code to generate these > >ancestors. > > >Animal > > ID > > Name > > > >Foal > > ID > > SireID > > DamID > > Would it be any more difficult to make a self-referential table? Like So? > If the information is unknown then the fields are blank otherwise the > SireID and DamID point back to the ID of another record in the same table. > > Animal >ID >Name >SireID >DamID > > I'm in the conceptual stage of a similar project for humans and this is the > approach I'm leaning towards. I'm planning on using something like this... > > Person > ID > Name > MotherID > FatherID > SpouseID > > The reason I chose this is that even though a lot of the Mother, Father and > Spouse fields might be "blank wasted space" I figured I'd be doing joins on > the two tables (three in my case with the additional one for spouse) so > often I'd be saving data storage space at the expense of data processing > power creating the joins on the fly every time I needed them. > > Just a thought... > > Matt > > P.S. If anyone sees any "evil" inherent in my design I'd love to know... This is an interesting idea, The spouse category interests me...Somehow I need to add a Litter enrollment table which would document the various litters...sires and dams and the whelping date. Lets compare progress...huh? Russell Griechen htttp://sportsmenafield.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Php-Beautify
This program says: Extract the files and put them in a directory, where they can be executed by PHP. My Php is in C:\Program Fileswhere should I extract these files to? Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PMA Database ... not OK[ Documentation ]
Does this mean that to use this version that I would have to pay for another database and how would this impact the database that is powering my site? The last couple of versions of PhpMyAdmin carries this: Error The additional Features for working with linked Tables have been deactivated. To find out why click 'here' Clicking on the Link... PMA Database ... not OK[ Documentation ] General relation features Disabled Info revealed: $cfg['Servers'][$i]['pmadb'] string Starting with version 2.3.0 phpMyAdmin offers a lot of features to work with master / foreign - tables. To use those as well as the bookmark feature you will need to create a new db. To use this functionality as superuser create a new database: create a new database for phpmyadmin: CREATE DATABASE phpmyadmin; Note that "controluser" must have SELECT, INSERT, UPDATE and DELETE privileges on this database. Here is a query to set up those privileges (using "phpmyadmin" as the database name, and "pma" as the controluser): GRANT SELECT,INSERT,UPDATE,DELETE ON phpmyadmin.* to 'pma'@'localhost'; do not give any other user rights on this database. enter the databasename in $cfg['Servers'][$i]['pmadb'] Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: file upload and php (Not a begginer [sic]question!)
Use SmartFtp connect ot your website open the directory open windows explorer open the directory and the files you want to upload drag and drop to Smart Ftp. I you want to drop in to www or htdocs, simply double click on htdocs or...www Then select the complete directory of files and folders that you want uploaded and it will create any folders needed and fill or overwite any directories or files. Russell Griechen - Original Message - From: "Paul Burney" <[EMAIL PROTECTED]> > > > I'm looking for a tool or script that could work like a direct ftp browser > > where you can select files and upload them fast as possible. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] php includes for templates
Daniel Cardenas graciously offered the script but I can not develop the right syntax. see code at: http://sportsmenafield.com/index.txt Russell Griechen...trying to escape frames to a php include template. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Exploding Nodes Recursively
Explode all folders to all levels? A exploding nodes... A drop down lets user select number of generations and the execution shows the trees being populated... I have been trying to find the code to execute this MySql table Dogs: ID AutoNumber Primary Key RegName Text Sex Yes/No Dame Long Int Indexed, Dups OK Sire Long Int Indexed, Dups OK table DogTree: ID Long Int Primary Key Generation Long Int RegName Text Sex Yes/No Dame Long Int Indexed, Dups OK Sire Long Int Indexed, Dups OK They could have more fields, but the essential data is in the ID, Dame and Sire fields. The Dame and Sire fields are foreign keys back to the ID field in the Dogs table itself. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Normalize ...relationships
a table 'hound' contains ownerID, breederID. These both are to be normalized in a separate table as in: CREATE TABLE sportsmen ( sportsmenID bigint (10)notnull autoincrement, Question: How? based on a sportsman can be a owner, breeder, hunter, President, Senator, Governor etc; CREATE TABLE hound ( houndID bigint(10) NOT NULL auto_increment, houndname varchar(60) , studbookID tinyint (4) , sireID bigint (10), damID bigint (10), dob varchar (20) , dod varchar (20) , colormarkID int (10) , ownerID bigint (10) , breederID bigint (10) , kennelID bigint (10) , litterID bigint (10) , health varchar (255) , PRIMARY KEY (houndID), UNIQUE KEY (houndID), KEY hdid_2 (houndID,houndname) ) TYPE=MyISAM COMMENT='Hound Registry'; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php.ini
> i found that even i have not the php.ini in my SYSTEMROOT, php can still > > run ... why? > > Sometimes they place it in C:\winnt\php.ini search for php.ini and it will show if there is a file and where it is. Russell Griechen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php