Jump to content

peterclutton

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

peterclutton's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=369655:date=Apr 29 2006, 04:20 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Apr 29 2006, 04:20 AM) [snapback]369655[/snapback][/div][div class=\'quotemain\'][!--quotec--] If I've understood correctly, you insert the client record first, and then get back the newly created ID using a call to MySQL's last_insert_id() function (or an equivalent function in your DB layer in Perl/PHP). With this ID in hand, you can easily insert the attendees record & pass the clientID from the previous query into your create statement. Voila! Hope that makes sense. [/quote] Thanks for the help, i think i understand what you're saying. I had things a bit mixed up. I just need to insert one table, then use the values from that id field for the corresponding id in the other. It was just the fact that i had 2 csv's of the data already. So i was trying to figure out a way to get those fields to match. Should i manually put the ids in for those ones and then upload them as they are? Does that make sense?
  2. Hi all, any help would be much appreciated I know that you can seperate data out into multiple tables and join themm with a unique ID field, but i dont understand the process of loading the data into both tables and haveng those keys the same. For instance if you have client information and then attendee information of those clients who attended a course of yours, you could have two tables: Clients: ID Contact Address Phone Attendees: ID Course ClientID And in the attendee table ClientID would be the same as the id from the clients table, so you dont have to repeat informtation in both tables. But If you have existing data, like from csvs, how do you keep those fields the same when loading the data? Please let me know if i haven't made any sense or haven't included enough information
  3. OK, thanks for that! legend! Seems like the Firefox way makes the most sense to me. But anyway I'll consider my options out of those two. Thanks again for the quick reply.
  4. Hi all, i'd really appreciate any insight or workaround for this. I have a form that displays a number of records, and at the bottom gives you buttons with various options, eg. Insert, Edit, Delete. These are basically in the form of: <button type=submit name=insert>Insert</button> I then have coe that checks the $_POST variable and acts accordingly. In Firefox, it works fine, and when I output print_r($_POST) after clicking Insert, it shows me Array(insert => insert) etc as you would expect. However in IE when i click one of these buttons, it sets ALL the values. When i display post it shows insert => insert delete => delete and so on. Thus each seperate section of code i have all gets called. Am i doing this the wrong way? Is there an easy fix, or should i change the approach entirely? Many 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.