www.webdeveloper.com
Results 1 to 2 of 2

Thread: I can only add one row to a table. Why?

  1. #1
    Join Date
    May 2009
    Location
    Rochester, NY
    Posts
    364

    Question I can only add one row to a table. Why?

    I have a database full of many tables. They're all working fine. However, on this one table, I can only add one row. As soon as that one row is added, I cannot add any more rows. Why?

    Here's the script I'm using:
    PHP Code:
    mysql_connect($dbserver,$username,$password);
    $v_dbLink mysql_connect($dbserver,$username,$password);
    mysql_select_db($dbname);
    $v_TheQuery "INSERT INTO `supervisors` (`id`,`supervisor`,`supervisee`) VALUES ('', 'aaa', 'bbb')";
    $v_TheResult mysql_query($v_TheQuery);
    $v_NumberOfRowsInserted mysql_affected_rows($v_dbLink);
    mysql_close($v_dbLink); 

  2. #2
    Join Date
    May 2009
    Location
    Rochester, NY
    Posts
    364
    OH! Auto-increment wasn't set! Wow, why do I only find my answers after I ask for help? :P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles