GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Nov-2006, 14:23
mrjameer mrjameer is offline
New Member
 
Join Date: Aug 2006
Posts: 19
mrjameer is on a distinguished road

mysql insert query in php


hi,

i have 2 mysql tables

first one is user table and its fields are as follows
id--userfield1--userfield2--userfield3
1--87878978--56564545--53342323

second table is user_values and it's fields are
user_id--field_id---field_value

1.here i want to write a insert query such that i can fetch the id from users table and store in user_values.user_id

2.the field_id value should be 1 for userfield1 and 2 for userfield2 and 3 for userfield3 in user_values table

3.fetch the userfield1 value from user and store it in field_value of user_value.finally user_values table should like this

user_id--field_id---field_value
1---1---87878978
1---2---56564545
1---3---53342323.
2---1---99999999
2---2---88888888
2---3---66666666
i have 10 records in user table.how i can fetch and store these values.please guide me how i can do this.


thankig you
mrjameer.
 
 

Recent GIDBlogFlickr uploads of IA pictures by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cpanel downgrade MYSQL 4.1.X to MySQL 4.0.xx Webhosting-live Web Hosting Forum 1 01-Sep-2006 02:54
php and mysql vladimy MySQL / PHP Forum 2 28-May-2005 05:17
urgent help needed :c + mysql insert jack C Programming Language 1 13-Apr-2004 21:16
PHP MySQL query jgnasser MySQL / PHP Forum 3 08-Apr-2004 05:42
Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More EyotaHosts Web Hosting Advertisements & Offers 0 28-Jun-2003 13:54

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:50.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.