rgb192
asked on
use a php function and not exclusively mysql for my learning
using mysqli, or pdo
I would like a php function that prepends 'begin' and postpends 'end' to an existing varchar field
table.column1 int primary key autoincrement
table.column2 varchar
table.column3 varchar
example output
5454 begin5454end
656 begin656end
4 begin4end
A beginAend
while this can be done with only mysql
UPDATE table SET column3 = CONCAT("begin",column2,"en d")
I would like to use a php function so I can learn php functions.
I would like a php function that prepends 'begin' and postpends 'end' to an existing varchar field
table.column1 int primary key autoincrement
table.column2 varchar
table.column3 varchar
example output
5454 begin5454end
656 begin656end
4 begin4end
A beginAend
while this can be done with only mysql
UPDATE table SET column3 = CONCAT("begin",column2,"en
I would like to use a php function so I can learn php functions.
ASKER
but how would this work with a select and update
making sure to update the correct row.
making sure to update the correct row.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
okay this is an example of a mysql connection and php function combined.
Thanks.
Thanks.
Open in new window