Gossamer Forum
Home : Products : DBMan : Customization :

small and big letters by adding of new record

Quote Reply
small and big letters by adding of new record
Hello again,

First of all I want to thank you for your trouble and support.

I have one question now.

How can I make the recognition of big and small letters in my database?

I need it for my Alphabetic listing with following code:





$fieldnum = 0;
$fieldname = Title;
open (DB, "<$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");
if ($db_use_flock) {
flock(DB, 1);
}
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
@fields = &split_decode ($line);
$letter = substr($fields[$fieldnum],0,1);
if (!(grep $_ eq $letter, @alphabet)) {
push (@alphabet, $letter);
}
}
close DB;

print qq|<P><CENTER>|;
$i = 65;
while ( $i < 91 ) {
if (grep $_ eq chr($i), @alphabet) {
print qq| <A HREF="$db_script_link_url&sb=1&so=ascend&$fieldname=%5E|;
print chr($i);
print qq|&re=on&view_records=1">[|;
print chr($i);
print qq|]</a>\n|;
}
else {
print "[" . chr($i) . "]";
}
++$i;
}

print qq|</CENTER></P>


|;


If I enter a word (by adding a record in the field "Title") which begins with a small letter, this word will be not indexed in the alphabetic listing.

Also I don't have this letter recognition by adding of records:

I have changed my $db_key to "Title". For example I have already the word "Access" in my database. If I enter the word "access" now, this word will be easily stored into my data base, without showing error message "Dublicate key error" to me. It seems that data base doesn't make recognition of big and small letters.

Perhaps I can make in such a way that the initial letters by adding a record are automatically converted into large letters?

Any ideas?



Thanks
Subject Author Views Date
Thread small and big letters by adding of new record uhrwerk 4087 Aug 14, 2003, 2:24 AM
Thread Re: [uhrwerk] small and big letters by adding of new record
kellner 3973 Aug 14, 2003, 3:23 PM
Thread Re: [kellner] small and big letters by adding of new record
uhrwerk 3959 Aug 15, 2003, 4:07 AM
Thread Re: [uhrwerk] small and big letters by adding of new record
kellner 3964 Aug 15, 2003, 5:04 AM
Post Re: [kellner] small and big letters by adding of new record
uhrwerk 3946 Aug 16, 2003, 5:33 AM