Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 06-10-2007, 12:25 AM   #1
edgy
 
edgy's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem

Hi, I have what I imagine to be a very simple problem while importing an sql
file into my database. the error that shows up is this:

MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'SELECT configuration_group_id FROM configuration_group WHERE co




here is what it is trying to process:



INSERT INTO `configuration` ( `configuration_id` , `configuration_title` ,
`configuration_key` , `configuration_value` , `configuration_description` ,
`configuration_group_id` , `sort_order` , `last_modified` , `date_added` ,
`use_function` , `set_function` )
VALUES (
'', 'Number Of Prices Per Products', 'XPRICES_NUM', '1', 'Number of prices
per products<br><br><b>WARNING: Changing this value will delete prices entry
in products table!</b><br><br><b>Every groups that use a deleted price will
use product default price.</b>', (

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B'
), '31', '2003-11-11 18:33:04', '0000-00-00 00:00:00', 'tep_update_prices',
'tep_cfg_pull_down_prices('
), (
'', 'Allow Guest To See Prices', 'ALLOW_GUEST_TO_SEE_PRICES', 'false',
'Allow guests to view default prices', (

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B'
), '32', '', '2004-03-15 14:59:05', NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
), (
'', 'Guest Discount', 'GUEST_DISCOUNT', '0', 'Guest discount', (

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B'
), '33', '', '2004-03-15 14:59:05', NULL , ''
), (
'', 'Special price (products price hiding)', 'SPECIAL_PRICES_HIDE', 'false',
'Special price (products price hiding)', (

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B'
), '34', '', '2004-03-15 14:59:05', NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
), (
'', 'New customer Enable', 'NEW_CUSTOMERS_ENABLED', 'false', 'Enable or
disable new customers after their registration', (

SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B'
), '35', '', '2004-03-15 14:59:05', NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
);



could anybody point me in the right direction? Unfortunately, I can't seem
to find the version of MySQl my host is using (dotster.com)...

Thanks for any help. I also apologize if this is the wrong forum for this
type of question.





--------------------------------------------------------------------------------





 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 06-10-2007, 12:25 AM   #2
Jerry Stuckle
 
Jerry Stuckle's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem

edgy wrote:
> Hi, I have what I imagine to be a very simple problem while importing an sql
> file into my database. the error that shows up is this:
>
> MySQL said:
>
> #1064 - You have an error in your SQL syntax. Check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> 'SELECT configuration_group_id FROM configuration_group WHERE co
>

<snip>

The version of MySQL is quite important here. What does phpinfo() show
you?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-10-2007, 12:25 AM   #3
edgy
 
edgy's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem


"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:XqOdnYMQrPgG7djYnZ2dnUVZ_u-dnZ2d@comcast.com...
> edgy wrote:
>> Hi, I have what I imagine to be a very simple problem while importing an
>> sql
>> file into my database. the error that shows up is this:
>>
>> MySQL said:
>>
>> #1064 - You have an error in your SQL syntax. Check the manual that
>> corresponds to your MySQL server version for the right syntax to use near
>> 'SELECT configuration_group_id FROM configuration_group WHERE co
>>

> <snip>
>
> The version of MySQL is quite important here. What does phpinfo() show
> you?
>


Hi Jerry,
ok, I asked the customer support and they gave me this info:
mysqld Ver 4.0.18-standard
phpMyAdmin 2.8.0.4

Thanks for taking the time!


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-10-2007, 12:26 AM   #4
Jerry Stuckle
 
Jerry Stuckle's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem

edgy wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:XqOdnYMQrPgG7djYnZ2dnUVZ_u-dnZ2d@comcast.com...
>
>>edgy wrote:
>>
>>>Hi, I have what I imagine to be a very simple problem while importing an
>>>sql
>>>file into my database. the error that shows up is this:
>>>
>>>MySQL said:
>>>
>>>#1064 - You have an error in your SQL syntax. Check the manual that
>>>corresponds to your MySQL server version for the right syntax to use near
>>>'SELECT configuration_group_id FROM configuration_group WHERE co
>>>

>>
>><snip>
>>
>>The version of MySQL is quite important here. What does phpinfo() show
>>you?
>>

>
>
> Hi Jerry,
> ok, I asked the customer support and they gave me this info:
> mysqld Ver 4.0.18-standard
> phpMyAdmin 2.8.0.4
>
> Thanks for taking the time!
>
>


That makes it simple. Subselects aren't supported before MySQL 4.1.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-10-2007, 12:26 AM   #5
edgy
 
edgy's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem


"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:H_2dnU6X4pvGd9jYnZ2dnUVZ_rednZ2d@comcast.com. ..
> edgy wrote:
>> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>> news:XqOdnYMQrPgG7djYnZ2dnUVZ_u-dnZ2d@comcast.com...
>>
>>>edgy wrote:
>>>
>>>>Hi, I have what I imagine to be a very simple problem while importing an
>>>>sql
>>>>file into my database. the error that shows up is this:
>>>>
>>>>MySQL said:
>>>>
>>>>#1064 - You have an error in your SQL syntax. Check the manual that
>>>>corresponds to your MySQL server version for the right syntax to use
>>>>near
>>>>'SELECT configuration_group_id FROM configuration_group WHERE co
>>>>
>>>
>>><snip>
>>>
>>>The version of MySQL is quite important here. What does phpinfo() show
>>>you?
>>>

>>
>>
>> Hi Jerry,
>> ok, I asked the customer support and they gave me this info:
>> mysqld Ver 4.0.18-standard
>> phpMyAdmin 2.8.0.4
>>
>> Thanks for taking the time!
>>
>>

>
> That makes it simple. Subselects aren't supported before MySQL 4.1.
>
> --

ok, I see.. any hints on rewriting this?


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-10-2007, 12:26 AM   #6
Jerry Stuckle
 
Jerry Stuckle's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem

edgy wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:H_2dnU6X4pvGd9jYnZ2dnUVZ_rednZ2d@comcast.com. ..
>
>>edgy wrote:
>>
>>>"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>>>news:XqOdnYMQrPgG7djYnZ2dnUVZ_u-dnZ2d@comcast.com...
>>>
>>>
>>>>edgy wrote:
>>>>
>>>>
>>>>>Hi, I have what I imagine to be a very simple problem while importing an
>>>>>sql
>>>>>file into my database. the error that shows up is this:
>>>>>
>>>>>MySQL said:
>>>>>
>>>>>#1064 - You have an error in your SQL syntax. Check the manual that
>>>>>corresponds to your MySQL server version for the right syntax to use
>>>>>near
>>>>>'SELECT configuration_group_id FROM configuration_group WHERE co
>>>>>
>>>>
>>>><snip>
>>>>
>>>>The version of MySQL is quite important here. What does phpinfo() show
>>>>you?
>>>>
>>>
>>>
>>>Hi Jerry,
>>>ok, I asked the customer support and they gave me this info:
>>>mysqld Ver 4.0.18-standard
>>>phpMyAdmin 2.8.0.4
>>>
>>>Thanks for taking the time!
>>>
>>>

>>
>>That makes it simple. Subselects aren't supported before MySQL 4.1.
>>
>>--

>
> ok, I see.. any hints on rewriting this?
>
>


Edgy,

Hmmm, I think I screwed up. You're doing an INSERT, not a SELECT, and
the SELECT should be valid.

I'm not sure about your use of parens, though - I think you may have
some balancing problems. Maybe something more like: (reformatted a
little to better suit my liking :-) )

Basically I took the parens out from around your SELECT statements
(they're not needed) and tried to ensure they were balanced around your
values - one set of parens around each set of values, and one set around
all the values.

Not having your database schema I can't test it, but something like this
should be close.

One other thing - can you get it to work with one set of values (instead
of 4)? When having trouble like this I generally get a single set
working then add the others later.


INSERT INTO `configuration`
(`configuration_id` ,
`configuration_title` ,
`configuration_key` ,
`configuration_value` ,
`configuration_description` ,
`configuration_group_id` ,
`sort_order` ,
`last_modified` ,
`date_added` ,
`use_function` ,
`set_function` )
VALUES (
(
'',
'Number Of Prices Per Products',
'XPRICES_NUM', '1',
'Number of prices per products<br><br><b>WARNING: Changing this
value will delete prices entry in products table!</b><br><br><b>Every
groups that use a deleted price will use product default price.</b>',
SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B' ,
'31',
'2003-11-11 18:33:04',
'0000-00-00 00:00:00',
'tep_update_prices',
'tep_cfg_pull_down_prices('
),
(
'',
'Allow Guest To See Prices',
'ALLOW_GUEST_TO_SEE_PRICES',
'false',
'Allow guests to view default prices',
SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B',
'32',
'',
'2004-03-15 14:59:05',
NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
),
(
'',
'Guest Discount',
'GUEST_DISCOUNT',
'0',
'Guest discount',
SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B',
'33',
'',
'2004-03-15 14:59:05',
NULL ,
''
),
(
'',
'Special price (products price hiding)',
'SPECIAL_PRICES_HIDE',
'false',
'Special price (products price hiding)',
SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B',
'34',
'',
'2004-03-15 14:59:05',
NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
),
(
'',
'New customer Enable',
'NEW_CUSTOMERS_ENABLED',
'false',
'Enable or disable new customers after their registration',
SELECT configuration_group_id
FROM configuration_group
WHERE configuration_group_title = 'TotalB2B',
'35',
'',
'2004-03-15 14:59:05',
NULL ,
'tep_cfg_select_option(array(\'true\', \'false\'),'
));

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-10-2007, 12:26 AM   #7
edgy
 
edgy's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default mysql problem


"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:c-adnQ65gb_-PtvYnZ2dnUVZ_oCdnZ2d@comcast.com...
> edgy wrote:
>> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>> news:H_2dnU6X4pvGd9jYnZ2dnUVZ_rednZ2d@comcast.com. ..
>>
>>>edgy wrote:
>>>
>>>>"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>>>>news:XqOdnYMQrPgG7djYnZ2dnUVZ_u-dnZ2d@comcast.com...
>>>>
>>>>
>>>>>edgy wrote:
>>>>>
>>>>>
>>>>>>Hi, I have what I imagine to be a very simple problem while importing
>>>>>>an sql
>>>>>>file into my database. the error that shows up is this:
>>>>>>
>>>>>>MySQL said:
>>>>>>
>>>>>>#1064 - You have an error in your SQL syntax. Check the manual that
>>>>>>corresponds to your MySQL server version for the right syntax to use
>>>>>>near
>>>>>>'SELECT configuration_group_id FROM configuration_group WHERE co
>>>>>>
>>>>>
>>>>><snip>
>>>>>
>>>>>The version of MySQL is quite important here. What does phpinfo()
>>>>>show you?
>>>>>
>>>>
>>>>
>>>>Hi Jerry,
>>>>ok, I asked the customer support and they gave me this info:
>>>>mysqld Ver 4.0.18-standard
>>>>phpMyAdmin 2.8.0.4
>>>>
>>>>Thanks for taking the time!
>>>>
>>>>
>>>
>>>That makes it simple. Subselects aren't supported before MySQL 4.1.
>>>
>>>--

>>
>> ok, I see.. any hints on rewriting this?

>
> Edgy,
>
> Hmmm, I think I screwed up. You're doing an INSERT, not a SELECT, and the
> SELECT should be valid.
>
> I'm not sure about your use of parens, though - I think you may have some
> balancing problems. Maybe something more like: (reformatted a little to
> better suit my liking :-) )
>
> Basically I took the parens out from around your SELECT statements
> (they're not needed) and tried to ensure they were balanced around your
> values - one set of parens around each set of values, and one set around
> all the values.
>
> Not having your database schema I can't test it, but something like this
> should be close.
>
> One other thing - can you get it to work with one set of values (instead
> of 4)? When having trouble like this I generally get a single set working
> then add the others later.
>
>

<snip>

Hi Jerry,

thanks for your help, but I still couldn't get past the syntax errors, and
Irealize I have absolutely no chance of figuring this out without spending a
few days reading the manual, so I was able to get something else that
hopefully solved the issue I was having with my database.

Thanks for your help though...it seems like an interesing language to study
at some point.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL and Apache problem Paul Morrison Database 2 06-10-2007 12:19 AM
problem with mysql.sock Ben Database 2 05-31-2007 8:49 PM
Problem character set utf8 in Mysql 4.1.9-nt and ASP (v3). Yan Database 3 05-31-2007 8:49 PM
Problem with MySQL and ODBC André Database 2 05-31-2007 8:46 PM


Featured Websites




All times are GMT +1. The time now is 4:36 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98