Adding some constraints about PK
This commit is contained in:
@@ -66,8 +66,18 @@ else
|
||||
echo 'Testing select visibility = true and x = 32 (experimental - should find 1)<br/>';
|
||||
$result = $xmldbtest->selectFromChilds('table1',array('visibility'=>'true', 'x'=>'32'));
|
||||
echo count($result).' results<br/><br/>';
|
||||
|
||||
|
||||
echo '<br/>Testing insertNode that already exist (should do "ko")<br/>';
|
||||
if($xmldbtest->insertNode(array('name'=>'item', 'attributes'=>array('id'=>'test'), 'childs'=>array('visibility'=>'true', 'x'=>'33')), 'table1'))
|
||||
echo "ok<br/><br/>";
|
||||
else
|
||||
echo "ko<br/><br/>";
|
||||
|
||||
echo '<br/>Testing insertNode that doesn\'t exist (should do "ok")<br/>';
|
||||
if($xmldbtest->insertNode(array('name'=>'item', 'attributes'=>array('id'=>'test2'), 'childs'=>array('visibility'=>'true', 'x'=>'33')), 'table1'))
|
||||
echo "ok<br/><br/>";
|
||||
else
|
||||
echo "ko<br/><br/>";
|
||||
|
||||
echo '<br/>Testing updatingNodeAttribute with no insert (should be ok and change the item "links" into "zelda" haha)<br/>';
|
||||
if($xmldbtest->updateNodeAttribute('table1', array('id', 'links'), array('id', 'zelda')))
|
||||
|
Reference in New Issue
Block a user