some simple tasks
Posted: Tue Sep 13, 2005 12:58 am
I am completely new to working with mysql databases and php and would appreciate just some pointers on how to do these simple tasks.
Given a database and a table in that database, with the name 'incoming'', fields field1, field2, field3, etc, like the table below, how do I insert a new row of data like row 1 below (what is the exact php code required)
'incoming'
| field1 | field2 | field3 | field4 | field5 |
row 1 a 45 24 11 30
row 2 b 41 11 39 61
row 3 c 11 46 64 26
row 4 d 21 31 29 37
And given the entire set of data, how do I get all the rows and column data and then print out all the data, print out only row 2 data, print out only the data from field 2, etc? Would we first put all the data in a multidimensional array then go from there?
Given a database and a table in that database, with the name 'incoming'', fields field1, field2, field3, etc, like the table below, how do I insert a new row of data like row 1 below (what is the exact php code required)
'incoming'
| field1 | field2 | field3 | field4 | field5 |
row 1 a 45 24 11 30
row 2 b 41 11 39 61
row 3 c 11 46 64 26
row 4 d 21 31 29 37
And given the entire set of data, how do I get all the rows and column data and then print out all the data, print out only row 2 data, print out only the data from field 2, etc? Would we first put all the data in a multidimensional array then go from there?