Thanks for the response.
For now I've just gone ahead and changed those two lines and they seem to
work fine with our mysql 4.1 install on FreeBSD. I won't know until
Friday morning how mysql 5 reacts.
Here is what I changed for anyone that's interested.
In functions/abook_database.php
* starting line 319:
/* Create query */
$query = sprintf("INSERT INTO %s (owner, nickname, firstname, " .
"lastname, email, `label`) VALUES('%s','%s','%s'," .
"'%s','%s','%s')",
* starting line 399:
/* Create query */
$query = sprintf("UPDATE %s SET nickname='%s', firstname='%s', ".
"lastname='%s', email='%s', `label`='%s' ".
"WHERE owner='%s' AND nickname='%s'",
I probably should have just backticked all the column names, but for now I
just did label. The portability issue doesn't really affect our install,
but I can see the concern with the escapes being part of the SM package.
Being able to set the column names would probably be a good alternative.
Thanks again.
Matthew Ruzicka - Systems Administrator
Front Range Internet, Inc.
[EMAIL PROTECTED] - (970) 212-0728
Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com
On Mon, 27 Feb 2006, Jonathan Angliss wrote:
On Mon, February 27, 2006 18:32, Matt Ruzicka wrote:
Is anyone running SM with mysql 5?
Not installed on my test server yet. Should do that along with php 5 some
time soon.
We are are currently using mysql to store our user preferences and
address books and are about to upgrade from mysql 4.1 to mysql 5. I have
a concern about the new reserved word 'label' that is part of mysql 5
because there is a column named 'label' that the address book uses.
Hrm. I was about to start rambling about the table design only being a
recommendation, and that you can tweak the field names to what you
desire... then I looked at the code, and realized I was wrong.
The preference system allows for the administrator to define their own
fields, tables, etc, while the adressbook does not appear to do so. That
should probably be something we fix, and I'll start looking at this
weekend.
Looking at the SM code it does not appear that column name is being
properly escaped, but I would sort of be surprised if this wasn't handled
properly since mysql 5 has been out for some time. I wasn't sure if
maybe PHP handles this escaping so the code doesn't need to reflect it
directly, but I was hoping to avoid breaking SM when we upgrade.
I doubt PHP handles it for us, I don't see any special code in there at
all. Fortunately it appears to only be 2 lines of code. In
functions/abook_database.php, should be lines 321, and 401, just fix the
quoting for the field name. I doubt it's going to affect the fetching of
the addressbook data.
Does anyone have experience with this that could maybe give some
indication if this is an non-issue or not?
I'll have a play with MySQL 5 this weekend on my test box. As well as
looking at the possible implementation of custom field names.
--
Jonathan Angliss
<[EMAIL PROTECTED]>
[ PGP Signature check FAILED - Tue Feb 28 09:37:39 MST 2006 ]
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
--
squirrelmail-users mailing list
Posting Guidelines:
http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: [email protected]
List Archives:
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users