Forums / Upgrading from 1.2 to 1.3.x / Bug in SQL??? [not a bug]

Bug in SQL??? [not a bug]

Locked

Started by scriber on 12 May 2006, 3:03 PM · Views: 3,052

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
12 May 2006, 3:03 PM
#1
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Bug in SQL??? [not a bug]

Line 2166 of zc_install/mysql_zencart.sql:

INSERT INTO configuration 
(configuration_title, configuration_key, configuration_value, 
configuration_description, configuration_group_id, sort_order,
 last_modified, date_added, use_function, set_function) VALUES
 ('Convert currencies for Text emails', 'CURRENCIES_TRANSLATIONS', 
'£,:€,', 'What currency conversions do you need for Text emails?<br />Default = &pound;,:&euro;,', 
12, 120, NULL, '2003-11-21 22:16:36', NULL, 'zen_cfg_textarea_small(');

Should the value for 'set_function' be:
zen_cfg_textarea_small();
rather than:
zen_cfg_textarea_small(

Is this a bug?

p.s. I couldn't find anywhere to post bugs so I put it in here.

12 May 2006, 4:17 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Bug in SQL??? [not a bug]

Scriber:

Should the value for 'set_function' be:
zen_cfg_textarea_small();
rather than:
zen_cfg_textarea_small(

Is this a bug?
I'd say that this is not a bug. The zen_cfg_textarea_small function needs a parameter and Zen Cart doesn't know what it will be when setting up the database and so defines the function and opens the brackets. Later on code such as

eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
```(taken from modules.php) add the parameter and the closing bracket and execute the statement.

The closing bracket that you can see in the SQL is not linked to zen_cfg_textarea_small, but is the end of the '); SQL syntax that opened with ('Convert currencies

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

12 May 2006, 4:44 PM
#3
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

I thought that might be the case, but just from looking through the table, I didn't see any other fields containing functions which weren't closed.
The only reason I came across this was from exporing my database (via phpMyAdmin) for backup pupooses. I then went to re-import generated SQL file from MySQL Query Browser. This stopped on this particular line (along with a few others) complaining of an error in the syntax.
Anyway, glad to know this isn't a bug :smile:
Cheers.

12 May 2006, 4:57 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Bug in SQL??? [not a bug]

Scriber:

I then went to re-import generated SQL file from MySQL Query Browser. This stopped on this particular line (along with a few others) complaining of an error in the syntax
That's a relief. I'd been wondering what sort of person reads 2000+ lines of SQL looking for bugs:wink2:

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

12 May 2006, 5:43 PM
#5
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

The kind that's nearing a deadline and supposed to be doing something important always seems to spend valuable time getting deep into something totally unrelated :Flush:

(like just now, I just spent 6 minutes looking for the right smiley to go with that message :no: )

p.s. If this was a bug. Where would be the propper place to report it?

12 May 2006, 5:52 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Bug in SQL??? [not a bug]

Until last week there was a section on the old forum.

This has disappeared and I suspect will be replaced shortly by a proper bug tracking system. So I guess the answer is ... do exactly as you did for the time being and hopefully we'll have a better solution shortly.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

12 May 2006, 6:23 PM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

What version of ZC?

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

12 May 2006, 6:24 PM
#8
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

Will Do!

Cheers!

12 May 2006, 6:27 PM
#9
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

It's Zen Cart 1.3.0.1
Database Patch Level: 1.3.0.1

12 May 2006, 6:30 PM
#10
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

I'm going to move this thread to the upgrade forum since there isn't a bug forum. I think it'll get more notice there.

I think I can still do that... :eek:

Hmmm... guess not. This board may not have that function... or I don't have the authority on it. :blink:

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

12 May 2006, 6:39 PM
#11
scriber avatar

scriber

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Bug in SQL??? [not a bug]

Well, it's not really a bug so it doesn't need that much notice.
It's more of a 'This is what happens if you try to do thing this way'.