Re: [basex-talk] How to delete a node with PHP?
Dear Yoann Maingon, your code snippet looks fine to me. I would assume that a third command won't return any results, as they should have been deleted from your database: print $session->execute(“XQUERY //definition/item[@type=’test’]”); If that's not the case, or if I didn't answer your question, feel free to give us more details on your problem. Christian On Tue, Mar 8, 2011 at 12:46 AM, Yoann Maingon <yoann.maingon@prodeos.com> wrote:
Hi,
I’ve started using BaseX as a database for a PHP project. I can open the database and add nodes but I can’t delete nodes. I’ve tested the XQUERY on the GUI and it works just fine. Any clue?
Here is the xquery:
Here is the php code: […] $session->execute(“OPEN data”); $session->execute(“XQUERY delete nodes (//definition/item[@type=’test’])”);
I’ve tried without “XQUERY” but gives the same result.
Would be nice to have a working example of such use.
Best Regards, Yoann Maingon
--------------------------------------- Yoann Maingon Prodeos +33 6.64.32.49.66 yoann.maingon@prodeos.com www.prodeos.com
Hi Christian, Thanks for confirming the syntax. It made me look closer on other possible issues and I realized I wasn't calling the right PHP file in my httprequest. It has been years without doing PHP, I've lost some reflex. Best regards, --------------------------------------- Yoann Maingon Prodeos +33 6.64.32.49.66 yoann.maingon@prodeos.com www.prodeos.com -----Message d'origine----- De : Christian Grün [mailto:christian.gruen@gmail.com] Envoyé : mardi 8 mars 2011 00:51 À : Yoann Maingon Cc : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] How to delete a node with PHP? Dear Yoann Maingon, your code snippet looks fine to me. I would assume that a third command won't return any results, as they should have been deleted from your database: print $session->execute(XQUERY //definition/item[@type=test]); If that's not the case, or if I didn't answer your question, feel free to give us more details on your problem. Christian On Tue, Mar 8, 2011 at 12:46 AM, Yoann Maingon <yoann.maingon@prodeos.com> wrote:
Hi,
Ive started using BaseX as a database for a PHP project. I can open the
database and add nodes but I cant delete nodes.
Ive tested the XQUERY on the GUI and it works just fine. Any clue?
Here is the xquery:
Here is the php code: [ ] $session->execute(OPEN data); $session->execute(XQUERY delete nodes (//definition/item[@type=test]));
Ive tried without XQUERY but gives the same result.
Would be nice to have a working example of such use.
Best Regards, Yoann Maingon
--------------------------------------- Yoann Maingon Prodeos +33 6.64.32.49.66 yoann.maingon@prodeos.com www.prodeos.com
participants (2)
-
Christian Grün -
Yoann Maingon