Unknown column 'location' in 'field list' Unknown column 'location' in 'field list'
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Unknown column 'location' in 'field list'

Started by zacoo, March 12, 2005, 01:41:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zacoo

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.

Nibbler

Search the board for 'unknown column location'

zacoo

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?

kegobeer

What thread did you pull that quote from?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots


kegobeer

That query appears to be in the bridge file.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

zacoo

#6
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);

Nibbler

So change it as advised to '' AS user_location

zacoo

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?

Nibbler

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

zacoo

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!