?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Insert data in the database
Author:??(---.cpe.net.cable.roger)
Date:???09-22-03 06:44

yes you can insert only parts into a table...for those columns where no data is to be inserted, you need to set the column attributes to allow nulls

to update a row you can use the update sql command like this

update pay_table set paid_amount = $someVar, paid_date=$someDate
where someUniqueId = $anID

usually the someUniqueId is the primary key for the column and is the column name ( like ID), $anID is the actual value for that row...

the date can be calc'd with the date function

$tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y"));

so the
$due_date = mktime (0,0,0,date("m") ,date("d")+50,date("Y"));

hth

?Topics Author? Date
?Insert data in the database??new
luckycat 09-21-03 19:48?
?Re: Insert data in the database??new
bastien 09-22-03 06:44?
?Re: Insert data in the database??new
luckycat 09-22-03 11:29?
?I have a phpMyChat-0.14.5??new
Al-Khaldi 09-26-03 12:13?
?Re: Insert data in the database??new
Floyd Burris 10-07-03 19:40?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > yes you can insert only parts into a table...for those > columns where no data is to be inserted, you need to set the > column attributes to allow nulls > > to update a row you can use the update sql command like this > > update pay_table set paid_amount = $someVar, > paid_date=$someDate > where someUniqueId = $anID > > usually the someUniqueId is the primary key for the column > and is the column name ( like ID), $anID is the actual value > for that row... > > the date can be calc'd with the date function > > $tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y")); > > so the > $due_date = mktime (0,0,0,date("m") ,date("d")+50,date("Y")); > > hth ">??

Provided By
Phorum