Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Code
- if ($action=="5"){
- $db->setDebug('true');
- $rid=$_REQUEST['rid'];
- $fields = array(5 =>'itemno', 'itemdesc', 'mat', 'matdesc', 'desc', 'addinfo', 'img', 'size', 'weight', 'n1', 'n2', 'n3', 'n4', 'n5', 'r1', 'r2', 'r3', 'r4', 'r5', 'cat');
- $i=5;
- foreach($_REQUEST['q'] as $a){
- if (!$a == ""){
- echo 'Setting '.$fields[$i].' to '.$a.'...';
- $b= htmlentities($a, ENT_QUOTES);
- $rs = $db->Execute("update prod set $fields[$i] = '$b' where id = '$rid'");
- if (!$rs === false) {echo'Done!<br />';}else {die ('ERROR!');}
- }
- $i++;
- };
- echo 'All Updates done';
- }
- ## Output
- Setting matdesc to Nylon - Multiple color options...
- --------------------------------------------------
- (mysql): update prod set matdesc = 'Nylon - Multiple color options' where id = '1'
- --------------------------------------------------
- Done!
- Setting matdesc to Nylon - Multiple color options...
- --------------------------------------------------
- (mysql): update prod set matdesc = 'Nylon - Multiple color options' where id = '1'
- --------------------------------------------------
- Done!
- Setting desc to This American-made classic has been down-sized by request but still offers appeal for its unisex appeal practical utility and versatility for school sports to corporate brand identity programs. U-PIK your own multi-color combination. Mix and match the duffel body ends webbing trim and zipper colors for the ultimate in customization 600 denier nylon lightweight and tear-resistant produces vibrant colorfast colors....
- -------------------------------------------------
- (mysql): update prod set desc = 'This American-made classic has been down-sized by request but still offers appeal for its unisex appeal practical utility and versatility for school sports to corporate brand identity programs. U-PIK your own multi-color combination. Mix and match the duffel body ends webbing trim and zipper colors for the ultimate in customization 600 denier nylon lightweight and tear-resistant produces vibrant colorfast colors.' where id = '1'
- -------------------------------------------------
- 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc = 'This American-made classic has been down-sized by request but still offe' at line 1
- An unexpected error occurred.
- mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc = 'This American-made classic has been down-sized by request but still offe' at line 1] in EXECUTE("update prod set desc = 'This American-made classic has been down-sized by request but still offers appeal for its unisex appeal practical utility and versatility for school sports to corporate brand identity programs. U-PIK your own multi-color combination. Mix and match the duffel body ends webbing trim and zipper colors for the ultimate in customization 600 denier nylon lightweight and tear-resistant produces vibrant colorfast colors.' where id = '1'")
Add Comment
Please, Sign In to add comment