saseow
Posts: 744
|
| Posted: 02/11/2005, 8:10 AM |
|
I need some help from some kind PHP guru.
I want to achieve the following and have no idea how to go about it using PHP and CCS.
When a user logs in, I need to check a MySQL table to see if that user has any records in the table using a field called user_id.If there are no records in the table for the particular user, I want to programmatically add 100 records for the user with several fields taken from two other tables and the records will, of course, include the session UserID.
I would also like to know how to loop through the 100 records at a later stage, summing a field that the user has filled in in the interim.
Any help or pointers will be hugely appreciated.
regards,
Trevor
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/11/2005, 3:20 PM |
|
This example shows general method of accessing database table from PHP: http://docs.codecharge.com/studio/html/ProgrammingTechn...leDBValues.html
You may also want to take a look at CCS Example Pack, which has various PHP code in events. Also the Online Store example has shopping cart page that moves records from one table to another.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|