Advertisement
Guest User

Untitled

a guest
May 25th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. I have a CF named acts. Within Acts there are columns named, name, city, region, country. The row has a keyID which is a UUID. What I am trying to accompilish is to retrive the proper row based on the keyID and then display the value of the specified column. This is not working out for me and I would like some help. Thanks!
  2.  
  3. <?php
  4.  
  5. error_reporting(E_ALL);
  6. require_once(dirname(__FILE__).'/../config.php');
  7.  
  8. if (!PandraCore::auto('localhost')) {
  9.     die(PandraCore::$lastError);
  10. }
  11.  
  12. $keyID = '635e06f0-3a84-012d-8d32-4040c61919ca';
  13.  
  14. $keySpace = 'Keyspace1';
  15.  
  16. $columnFamilyName = 'Acts';
  17.  
  18. class Act extends PandraSuperColumn {
  19.     public function init() {
  20.         global $keySpace, $columnFamilyName;
  21.         $this->addColumn('name', 'string');
  22.         $this->addColumn('city', 'string');
  23.         $this->addColumn('region', 'string');
  24.         $this->addColumn('country', 'string');
  25.     }
  26. }
  27.  
  28. $a = new Act($keyID);
  29. $a->load();
  30. echo 'RETRIEVED'.$a->name.'<BR>';
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement