Gossamer Forum
Home : Products : DBMan : Discussions :

Modify/Delete Own Records

Quote Reply
Modify/Delete Own Records
I have a free textbook exchange site I run using DBMAN at http://www.ezfindit.com/ezbooks

It's been running great for months. I recently tried to administer book posts as a user and when I click "Modify" after login, I get the error message: "Error: no matching records." despite the fact that there are 2 test records. I have duplicated the same problem with other user accounts also.

Here's the test account to try out:
User Id: test
Password: test

What could be causing it? How can it be fixed?

Any ideas would be very helpful. Thanks!

I'm attaching supporting files for reference.
Quote Reply
Re: [ezfindit] Modify/Delete Own Records In reply to
Would you mind saving your files as txt files and providing links to where they are located.

I can't speak for others, but I'd rather view the files on the web rather than having to save them on my computer to spot problems.

You may also want to post these types of posts in the customization forum.





Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Modify/Delete Own Records In reply to
I've saved them all as TXT files, they're located at:

http://www.ezfindit.com/ezbooks/test/default_db.txt
http://www.ezfindit.com/ezbooks/test/default_cfg.txt
http://www.ezfindit.com/ezbooks/test/html_pl.txt

Thanks.

Quote Reply
Re: [ezfindit] Modify/Delete Own Records In reply to
One thing I spotted in your .cfg file change:

ID => [0, 'number', 6, 8, 1, '', ''],
TO:
ID => [0, 'numer', 6, 8, 1, '', ''],

You do have tracking turned off, but I noticed you do have numbers within your database?

You are using the School field as a select but it is not defined as such in your .cfg file.
The selection should be noted within the section:

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = ( );

Then in your html_record_form define the select field like this:

print &build_select_field("School",$rec{'School'},1); print qq|

There are ways to have you large select list be from an external file .. you may want to check the FAQ for how to do this.

Hope this helps



Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Modify/Delete Own Records In reply to
Your suggestion to change "number" to "numer" doesn't make sense. Why purposely mispell the number field definition.

Also the reason I didn't include stuff in the "select fields" is because my search form builds the search parameters as needed.

I still don't understand why users can't modify their own posts still. Using the test/test user/password combination for example. The "test" user has 2 records already, but when you try modifying them it gives the "no matching records" error message.

Still need HELP.


Quote Reply
Re: [ezfindit] Modify/Delete Own Records In reply to
>>Why purposely mispell the number field definition.<<

It isn't mis-spelt, that is the way it should be. alpha/numer/date

You need to think "perl-wise" rather than literally.

>>Also the reason I didn't include stuff in the "select fields" is because my search form builds the search parameters as needed.<<

They must be defined in the cfg file.

Last edited by:

PaulW: Nov 20, 2001, 2:09 PM
Quote Reply
Re: [PaulW] Modify/Delete Own Records In reply to
Ohh... I forgot about that. Thanks! Blush

I'll fiddle with it some more and try those things out. Although something's not rights still. When you add new records, the modify/delete function works, but not for older records. Very puzzling. Unsure

Thank again!
Quote Reply
Re: [ezfindit] Modify/Delete Own Records In reply to
I don't quite get what you are trying to do. I assume you want to have "modify" and "delete" to work only for users' *own* records, right? So you would have $auth_modify_own set to "1" in your cfg-file.

However, the link in the footer - for "modify" and "delete" - is one to a "list all" function, with "ID=*". Maybe that's why it goes wrong, because when "ID=*" there will inevitably be search results which don't belong to the user in question.

Have you tried "$db_cols[$auth_user_field]=$db_userid" instead of "ID=*" in the query-string? (It should resolve to "lastname=test", if "lastname" is your username field and "test" is the user-id.)

Not sure that's *the* problem, but it seems to be *a* problem :-)
kellner