| 449 | | /** |
| 450 | | * function v098UpdateProducts |
| 451 | | * Updates the categoryid field from the category's id to uuid. |
| 452 | | */ |
| 453 | | |
| 454 | | function v098UpdateProducts() { |
| 455 | | |
| 456 | | $querystatement = " |
| 457 | | SELECT |
| 458 | | `id`, |
| 459 | | `uuid` |
| 460 | | FROM |
| 461 | | `productcategories` |
| 462 | | "; |
| 463 | | |
| 464 | | $queryresult = $this->db->query($querystatement); |
| 465 | | |
| 466 | | while($therecord = $this->db->fetchArray($queryresult)){ |
| 467 | | |
| 468 | | $id = $therecord["id"]; |
| 469 | | $uuid = $therecord["uuid"]; |
| 470 | | |
| 471 | | $updatestatement = " |
| 472 | | UPDATE |
| 473 | | `products` |
| 474 | | SET |
| 475 | | `categoryid`='".$uuid."' |
| 476 | | WHERE |
| 477 | | `categoryid`='".$id."' |
| 478 | | "; |
| 479 | | |
| 480 | | $this->db->query($updatestatement); |
| 481 | | |
| 482 | | }//end while |
| 483 | | |
| 484 | | }//end method --v098UpdateProducts00 |
| 485 | | |