Hey guys ,
I’m not sure how to go about this:,basically i want a pattern/algorithm which can do the following:
(search the database column(s) for an entry/record){
if record exists ,Update the entry in that column}
if it does not exist{
echo "some statement";
}
Consider the following example:
There are 3 columns: name,income_per_month, net_income
Each column has 2 entries: john and jake,500 and 100,1000 and 2000
I would like to:
1.Search for “rick” in the name column and produce an echo msg saying "no such name as “rick” is present .
2.Search for “john” in the name column and update the net_income column by adding 1000 to it.
Could someone give me the basic guidelines on how to go about it.I’m a bit new to php/mysql
Thanks in advance