[pmwiki-users] DataQuery and DataPlates

Ben Stallings ben at interdependentweb.com
Sun Feb 17 16:08:21 CST 2008

Hans wrote:
> DataQuery and DataPlates can see the db table fine, but nothing gets
> added.
> Until I get this solved all other errors are meaningless.
> I cannot show this online, it just runs on my local server.
> Any suggestions what to check further?

Well, it's hard to diagnose when I can't see what you're seeing, but I 
would say edit dataquery.php and try uncommenting the commented-out 
print statement in DataStore::write().  If it prints, comment it back 
out and add a similar line in DataQuery::write() (farther down in the 
file).  If that prints, uncomment the Abort line in DataQuery::write(). 
  (If you're inserting rather than updating a record, you will need to 
change GetUpdateSQL in that line to GetInsertSQL.)

My guess is that you won't get that far, because I suspect DataQuery is 
not getting called at all for this write request.

If you need an online account to test this on, I'll be happy to set one 
up for you, Hans.  You're doing me (and the PmWiki community) a favor!

> And how do I make the page names to be the first field, ie index
> field, so not to get an invisible page?

The word you're looking for is "key" field, and you set it with
(:key: fieldname:) in the query configuration.
With DataPlates there's a radio button for setting the key field.  It is 
a good practice to also have a key field in the table itself (which you 
set via phpMyAdmin), but this need not be the same as the key field of 
the query.

Hope that's clear.  --Ben S.

More information about the pmwiki-users mailing list