Jump to content

PatrickG

New Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by PatrickG

  1. Thanks.
  2. This is getting over my head, mysql (and technical English) is not my strongest point. Can you update my code with the on duplicate? Please?
  3. for ($a=0; $a < $teller; $a++) { $subarray=explode(";", $rows[$a]); $function=$subarray[0]; $lastname=addslashes($subarray[4]); $sms1=$subarray[5]; $uid=uid($lastname, $sms1); # this is what Im trying. if ($db->query("SELECT uid FROM data WHERE uid=$uid")) { $db->query("UPDATE data SET function2='$function'"); } $result = $db->query("INSERT INTO data (`function`,`uid`) values ('$function', '$uid')"); } It's something like this. If I'm missing a quote no problem in the real code it's there.
  4. The code is quite large so I'll shorten it.
  5. Hi, I've been coding for quite some time now but I have a problem I can't solve. I hope you can help me. I've added a flowchart so you can see my situation. I have a csv file with multiple lines for one person, one person can have multiple functions. The uid is an, really, an unique id and that's what I'm checking when the record is initially inserted in the database. I can't get it to work. It's stuck with updating the record. Perhaps you can help me. Kind regards, Patrick Goosen
×
×
  • 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.