[pmwiki-users] Interacting with MySQL

Rick Cook rick at rickcook.name
Sat Jan 26 21:52:35 CST 2008


On Tuesday 15 January 2008 09:18:06 you wrote:
> Rick Cook wrote:
> > Actually, the table does have an auto-incrementing integer key field. It
> > also has another field that I am requiring to be a unique email address
> > for each row of the table. I am actually trying to use the SelectQuery to
> > pick out the appropriate integer key field if there is a record that
> > already has the email address entered on the beginning page.
>
> Ah, I see.  It sounds like an (:update select:) might meet your needs as
> well as or better than a SelectQuery... it would certainly take up less
> space on your pages!  Just make sure to put it in a method=get form:
>
> (:input form method=get action=FormPage:)
> Edit an existing record:
> (:update select ContactID from=TableName label=Email null="Create a new
> record":)
> (:input submit:)
> (:input end:)

Thanks,

I made use of this idea for the "edit existing entries" part of my 
requirements and used a simple update form as the way to do the original 
entry. I guess I will live with the MySQL related error message that occurs 
if someone uses the "original entry form" and happens to input an email 
address that matches an existing entry.

I want people are not logged in to be able to create a new entry, however, I 
don't want them to be able to see the existing database content.


Rick



More information about the pmwiki-users mailing list