Jump to content


Photo

insert multiple records(lets see who good at their stuff)


  • Please log in to reply
3 replies to this topic

#1 ankycooper

ankycooper
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 14 September 2006 - 06:07 AM

hey i need a form fom which i can insert multiple records for each of the fields need help
empid, name, phone, address

#2 Zane

Zane
  • Administrators
  • Advanced Member
  • 4,134 posts

Posted 14 September 2006 - 06:09 AM

We're not here to write you're code for you

if you want that check out the PHP Freelancers form
there are plenty of people willing to do it....but it might cost ya...who knows

btn_donate_SM.gif Want to thank me? Contribute to my PayPal piggy-bank
 

172938.png

#3 ankycooper

ankycooper
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 14 September 2006 - 06:12 AM

i want to learn it. and not get it done
alraedy searched google cant find any clue

#4 joshi_v

joshi_v
  • Members
  • PipPipPip
  • Advanced Member
  • 168 posts

Posted 14 September 2006 - 10:24 AM

Ok.

If you want to insert all the fields in to same table try this

if($empid)
insert into `table name` (id,empid) values(id,$empid);

if($name $$ $name)
update 'table name' set name ='$name' where id ='id value' //Here i am assuming that u r not doing auto incrementing of the id .so here u have to insert previous id ur are using for empid.
else
here u have to write an insert query

same for other fields also.

If in case u want to insert into different  tabel it is much easier than previous one

Just write an insert query for each and every field.


Hope it will helps

Cheers :)









0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users