3
Answers

saving record with a same name but different id in php mysql

franco

franco

11y
1.7k
1
hi, im new at php and mysql stuff


i have a question regarding php and mysql database

how do i insert a record in the database with a same name but different id?

for example, a name "john" with an id of "123" and the other name also "john" but the id is "456". the id are different but the name is the same.

can anyone help me please..


thanks in advance!
Answers (3)
0
Shashank Srivastava

Shashank Srivastava

NA 1.4k 247k 11y
hello Franco, 

I am not sure what makes it so difficult to insert duplicate entries. Make sure the 'name' column is not set to 'unique' or 'primary'.

If problem persists, would like to have a look on the code.
0
franco

franco

NA 5 2.7k 11y
is there other way to make a little easier to understand?

thanks again
0
Satyapriya Nayak

Satyapriya Nayak

NA 53k 8m 11y
http://stackoverflow.com/questions/11971264/multiple-mysql-records-with-same-name-different-id