![]() |
Why wont this let me add more than 1 record?
So I have the basic CRUD setup but when it comes to adding a new domain (or several records) it will allow me to add the first record (ID=0) in the database, but then wont let me add anything additional, can anyone tell me why? :helpme
Quote:
|
Quote:
However, in what you posted, if it is the code that you are running there is a space in '$status' that should not be there, but that should blow it off every time not just on subsequent runs. Quote:
|
Thanks.
That 'Status' one just seems to be on GFY, its not on the server version, must have just been a FF issue. Would you possibly be able to share the php code that I can use to check MySQL for errors? :D |
Quote:
|
Quote:
. |
Quote:
The DB is set to "auto index"; but he has no field defined for the auto index. // Insert user data into table $result = mysqli_query($mysqli, "INSERT INTO DomainManagement(Registrar,DomainName,Registration ,Expiration,NameServer1,NameServer2,Status,Notes) VALUES('$Registrar','$DomainName','$Registration', '$Expiration','$NameServer1','$NameServer2','$Stat us','$Notes')"); The SQL table should have a record ID field. (You can do anything you want but ID is standard) The ID will be "" in the data fields so that SQL will create the ID number on insert for you. The code should look like this, I think. // Insert user data into table $result = mysqli_query($mysqli, "INSERT INTO DomainManagement(ID,Registrar,DomainName,Registration ,Expiration,NameServer1,NameServer2,Status,Notes) VALUES("", '$Registrar','$DomainName','$Registration', '$Expiration','$NameServer1','$NameServer2','$Stat us','$Notes')"); :2 cents: |
Thank you all for the help, I fixed the issue.
It was a messed up AI/NULL setting in the table. |
I recommend Mamp Pro/xDebug/Phpstorm. Using xDebug you can see what is happening at each step to help debug things.
|
Quote:
|
All times are GMT -7. The time now is 09:43 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123