Re: Application dev w/ PHP & MySql

From: Date: Tue, 31 Jul 2001 13:36:25 +0000
Subject: Re: Application dev w/ PHP & MySql
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10930@lists.php.net to get a copy of this message
i was really gonna try and answer this for you then it struck me that you've got quite a way to go in terms of your position relating to database design and so on. so... i'd sugest you read up a bit on the logic of the way you are trying to implement your database and theink about the logical flow of information from your tech guys. for example, you've got cust_key, cust_fname, cust_lname in the same row of the db where cust_key, presumabely, uniquely identifies each customer. this would be stored elsewhere in the database and will be replicated for no reason. i'd think seriously about the job the db is performing and then design it from the bottom up instead of hacking out a simple db that will cause you problems in the future. don't mean to sound like an ass but if you put the work in at first then you'll reap the rewards later. or something :-) Steve "Robert Barish" <bob@bmtsolutions.com> wrote in message news:01073014001600.22120@mail... Hello I am having to learn php and mysql, at the sametime and with a time constraint. So I am hoping I can have a lending hand from all the coding gurus out there. Let my give you a little back ground. I the owner of an ISP tech support outsourcing company and am trying to develop a call note system where the techs input to mysql notes on the call the teched and then have our clients (isps) use and authenicated site to do a search view the browser on a particuliar user's call note history. At the present time I am working on the Insertion part of the php script. I have created a data base in mysql and have been able to populate the data base. When the tech hits the submit button and the data is inserted into the customer table, with cust_key, tech_key, cust_fname, cust_lname, cust_username, cust_timestamp columns and into table issues with issue_key, issue_type, issue_entry, issue_date columns. I have this part working great. There is one more table in need to populate when the tech submits a call note and this is labled cust_issue_association. The cust_issue_association table has the following columns cust_key and issue_key. This table is being use to tie in the tables for a search. My problem is I have no idea on how to populate this table. When a call note is submitted into the customer table the cust_key is auto_incremented and in the issues table the issue_key is auto incremented. So the million dollar question that is driving me crazy with is how do I get these two keys to be inserted into cust_issue_association table when the call note is submitted. I have attached what I have done so far (please excuse the readabiltiy and basicness of the code this is my first time doing this) I hope I have described this clearly enough. Of course, I will give created in the code and on the appropriate html page, where create is do for the people who help me. Thank you ahead of time for all your inputs. Bob

« previous php.db (#10930) next »