coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: zacoo on March 12, 2005, 01:41:18 PM

Title: Unknown column 'location' in 'field list'
Post by: zacoo on March 12, 2005, 01:41:18 PM
I logged in as an testuser and created an useralbum in coppermine.

Then, logged as an admin, I couldn't open the album I created earlier.
QuoteThere was an error while processing a database query.

While executing query "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, location as user_location, interests as user_interests, website as user_website FROM `usr_web550_1`.ibf_members WHERE id = '7'" on 0

mySQL error: Unknown column 'location' in 'field list'


cpg132/include/functions.inc.php - Line: 105

Anyone has an idea?


I'm using invisionboard 2.x and a bridged cpg 132.
Title: Re: Unknown column 'location' in 'field list'
Post by: Nibbler on March 12, 2005, 04:38:54 PM
Search the board for 'unknown column location'
Title: Re: Unknown column 'location' in 'field list'
Post by: zacoo on March 12, 2005, 09:03:05 PM
fine so I gotta edit my database

Quote from: Nibbler on February 03, 2005, 02:08:01 PM
Try it and see. If it breaks then try changing 'location as user_location' to ' '' AS user_location'

which file?
Title: Re: Unknown column 'location' in 'field list'
Post by: kegobeer on March 12, 2005, 10:33:47 PM
What thread did you pull that quote from?
Title: Re: Unknown column 'location' in 'field list'
Post by: zacoo on March 12, 2005, 10:46:50 PM
http://forum.coppermine-gallery.net/index.php?topic=14470.0
Title: Re: Unknown column 'location' in 'field list'
Post by: kegobeer on March 12, 2005, 10:49:49 PM
That query appears to be in the bridge file.
Title: Re: Unknown column 'location' in 'field list'
Post by: zacoo on March 13, 2005, 07:16:56 PM
I modified the bridge file as exmplained:

QuoteWhile executing query "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, AS user_location, interests as user_interests, website as user_website FROM `usr_web550_1`.ibf_members WHERE id = '1'" on 0

mySQL error: 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 'AS user_location, interests as user_interests, website as user_

As it didn't work I reuploaded the original version of the file and looked for the sql-command...

that's what it looks like:
    $sql = "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, " . "location as user_location, interests as user_interests, website as user_website " . "FROM " . $UDB_DB_NAME_PREFIX . IB_TABLE_PREFIX . IB_USER_TABLE . " " . "WHERE id = '$uid'";
    $result = db_query($sql, $UDB_DB_LINK_ID);
Title: Re: Unknown column 'location' in 'field list'
Post by: Nibbler on March 14, 2005, 01:57:49 PM
So change it as advised to '' AS user_location
Title: Re: Unknown column 'location' in 'field list'
Post by: zacoo on March 28, 2005, 12:17:48 PM
my friend!
it still doesn't work

the original code is:
Quote$sql = "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, " . "location as user_location, interests as user_interests, website as user_website " . "FROM " . $UDB_DB_NAME_PREFIX . IB_TABLE_PREFIX . IB_USER_TABLE . " " . "WHERE id = '$uid'";
   $result = db_query($sql, $UDB_DB_LINK_ID);

der marked code was replaced by AS user_location


now the code looks like:
Quote$sql = "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, " . "AS user_location, interests as user_interests, website as user_website " . "FROM " . $UDB_DB_NAME_PREFIX . IB_TABLE_PREFIX . IB_USER_TABLE . " " . "WHERE id = '$uid'";
   $result = db_query($sql, $UDB_DB_LINK_ID);

but I get still the same errormessage

QuoteWhile executing query "SELECT name as user_name, mgroup, email as user_email, joined as user_regdate, AS user_location, interests as user_interests, website as user_website FROM `usr_web550_1`.ibf_members WHERE id = '7'" on 0

mySQL error: 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 'AS user_location, interests as user_interests, website as user_


I've been looking now for weeks, but got always the same message...
Has anyone an advice?
Title: Re: Unknown column 'location' in 'field list'
Post by: Nibbler on March 28, 2005, 12:32:46 PM
At risk of repeating myself, change it to '' AS user_location

That's:

single quote, single quote, space, a, s, space, u, s, e, r, underscore, l, o, c, a, t, i, o,n
Title: Re: Unknown column 'location' in 'field list'
Post by: zacoo on March 29, 2005, 05:36:58 PM
well Nibbler, I guess I owe you a medal or something  ;D

I alway forgot the damn single quotes...
thanks a lot for support!!

I had to do the same for the interests and the website,
but now it works perfectly!