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.
Search the board for 'unknown column location'
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?
What thread did you pull that quote from?
http://forum.coppermine-gallery.net/index.php?topic=14470.0
That query appears to be in the bridge file.
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);
So change it as advised to '' AS user_location
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?
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
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!