Announcement

Collapse
No announcement yet.

$userid=$DB_site->insert_id();

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • $userid=$DB_site->insert_id();

    $userid=$DB_site->insert_id();

    In register.php what does this line of code do? I had it commented out ACCIDENTALLY for a few days and like 9 people registered. How can I fix their accounts and so forth in the database.

  • #2
    That code captures the userid assigned to the last inserted record. The userid field is auto_increment so its value is determined at the time of insertion.

    I'm not sure what problems would arise from commenting out that line. What problems are those 9 users having?
    Last edited by Jake Bunce; Mon 10 May '04, 7:09pm.

    Comment


    • #3
      Well I registered 3 accounts and finally figured out the problem was with the code and not the database.

      Upon registration there was a database error (obviously). Emails were not being sent out to me as an admin about the error and an activation email was not being sent.

      As an admin I'm not able to find them in the database unless I use the quick user find thing on the main index page for the control panel. When I go to their profile and click the useroptions link their userid is blank in the URL so I get an error page.

      I'll look threw register.php and see where the variable would've been inserted I guess.

      Comment


      • #4
        I just had to create their row in userfield table. Thanks Jake for knocking some sense into me.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X