DB function failed with error number 1054

Need help with the Administration of your Joomla! site? Pop your questions in here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
coneli
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Nov 20, 2005 10:44 pm

DB function failed with error number 1054

Postby coneli » Sun Nov 20, 2005 10:56 pm

After installing Joomla and trying to administrate i recieve this message when clicking on the "content item manager"!

DB function failed with error number 1054
Unknown column 'c.access' in 'on clause' SQL=SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author FROM jos_content AS c, jos_categories AS cc, jos_sections AS s LEFT JOIN jos_groups AS g ON g.id = c.access LEFT JOIN jos_users AS u ON u.id = c.checked_out LEFT JOIN jos_users AS v ON v.id = c.created_by LEFT JOIN jos_content_frontpage AS f ON f.content_id = c.id WHERE c.state >= 0 AND c.catid = cc.id AND cc.section = s.id AND s.scope = 'content' ORDER BY s.title, c.catid, cc.ordering, cc.title, c.ordering LIMIT 0, 10

Please help

???

mdl_kid
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 13, 2006 5:14 pm
Location: Minneapolis
Contact:

Re: DB function failed with error number 1054

Postby mdl_kid » Fri Jan 13, 2006 5:49 pm

I am getting a similar error. When i first installed the program i could log in and do everything fine. I was changing details in parts of the program, I was working with the configuration file, and i made some minor changes. I turn on SEF hit save and it automatically loged me out. I couldn't log back in so i thought maybe the SEF wasn't working, so i opened up the config file in dreamweaver to change it back to 0. It did not fix the problem.

Any ideas?
Last edited by mdl_kid on Fri Jan 13, 2006 7:53 pm, edited 1 time in total.
---------------------------
Martin Dale Lyness
(Gabriel Frank Linux)

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: DB function failed with error number 1054

Postby Tonie » Fri Jan 13, 2006 6:46 pm

Are you both using Mysql 5? Mysql 5 isn't fully supported yet on Joomla, though it is getting better and almost there. For the moment, it will be easier to use Mysql 4.1.x

mdl_kid
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 13, 2006 5:14 pm
Location: Minneapolis
Contact:

Re: DB function failed with error number 1054

Postby mdl_kid » Fri Jan 13, 2006 7:54 pm

I fixed my problem, i was messing with the code and i didnt relize i didn't set everything back  to the original and the database code was wrong.
---------------------------
Martin Dale Lyness
(Gabriel Frank Linux)

jmacdoug2005
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Dec 05, 2005 7:21 pm

Re: DB function failed with error number 1054

Postby jmacdoug2005 » Wed Jan 18, 2006 6:52 pm

I am having the same problem. I am running MySql 4.1.10 and I come up with this error on my web page when someone clcks to register (anything having to do with registrations)

DB function failed with error number 1054
Unknown column 'session_id' in 'where clause' SQL=select * from mos_events_registrations where session_id=1 and cancel_date='0'and userid=-1

Any insight?
Last edited by jmacdoug2005 on Wed Jan 18, 2006 7:18 pm, edited 1 time in total.

mdl_kid
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 13, 2006 5:14 pm
Location: Minneapolis
Contact:

Re: DB function failed with error number 1054

Postby mdl_kid » Thu Jan 19, 2006 5:51 am

I got the unknown session id when my session save path was not set to a valid location. I had to use the session_save_path(mypath) in my configuration file to point to a location that sessions could be saved and read. It sounds like a session problem to me.

Martin
---------------------------
Martin Dale Lyness
(Gabriel Frank Linux)

jmacdoug2005
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Dec 05, 2005 7:21 pm

Re: DB function failed with error number 1054

Postby jmacdoug2005 » Thu Jan 19, 2006 2:55 pm

where would i actually make this change? in the config file in joomla? what exactly is the string to add?

thanks for your input.

jeff

jmacdoug2005
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Dec 05, 2005 7:21 pm

Re: DB function failed with error number 1054

Postby jmacdoug2005 » Thu Jan 19, 2006 3:10 pm

I actually just looked up the 1054 code on mysql.com and came up with this interpretation..

#

Error: 1054 SQLSTATE: 42S22 (ER_BAD_FIELD_ERROR)

Message: Unknown column '%s' in '%s'

I have no idea what to do. This is a bit frustrating.  errrrrrrr!

I appreciate all the help anyone gives!!

Jeff

mdl_kid
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 13, 2006 5:14 pm
Location: Minneapolis
Contact:

Re: DB function failed with error number 1054

Postby mdl_kid » Thu Jan 19, 2006 4:18 pm

if i remember correctly the field was bad because it didn't have the session set correctly, but then again it could have been when i tried changing the SQL statement also. If you did not change any of the code in Joomla then i guess it would be the session problem.

BUt the nyou would have had trouble installing joomla also. I had to put the code: "session_save_path(cgi-bin/tmp);" in both a file in the installation package and the "configuration.php" for joomla's main configuration after install. I don't remember what file i put the code into for the install but it should be easy to find if you look at the includes in the index.php of the install directory.

If this was not the problem, i don't know what to tell you other than try downloading the newest version and doing the install again.

Martin
---------------------------
Martin Dale Lyness
(Gabriel Frank Linux)

jmacdoug2005
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Dec 05, 2005 7:21 pm

Re: DB function failed with error number 1054

Postby jmacdoug2005 » Thu Jan 19, 2006 4:40 pm

If I do a fresh install of joomla will all of my coms, mods, and bot still exist? I will do a backup anyway but is this the case?

mdl_kid
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Jan 13, 2006 5:14 pm
Location: Minneapolis
Contact:

Re: DB function failed with error number 1054

Postby mdl_kid » Thu Jan 19, 2006 5:19 pm

Well that depends on whether you delete your entire website before you fresh install. You will have to erase your mysql database if you want to reinstall with the same prefix (I would suggest this so you don't have double the amount of tables for no reason). If you back up everything there will be no problems.
---------------------------
Martin Dale Lyness
(Gabriel Frank Linux)

jmacdoug2005
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Dec 05, 2005 7:21 pm

Re: DB function failed with error number 1054

Postby jmacdoug2005 » Thu Jan 19, 2006 6:28 pm

OK, I actually just created a subfolder and reinstalled joomla 1.0.7. Install went flawless. As soon as I installed the Events com it gave me the same crap! Now get this, I uninstalled the Events com and just installed the Events Sessions Com and that works like a champ!! I then went and applied the Event Sessions com to my main Joomla installation and that works fine as well. The Events com is just buggy at the moment and I don't have time so the Event Sessions com is just fine by itself for the time being.

Thanks alot for your helpful replies.

jeff

mod edit: please do not add signature manually, use your profile.
Last edited by brad on Thu Sep 07, 2006 9:56 am, edited 1 time in total.

theblase
Joomla! Intern
Joomla! Intern
Posts: 75
Joined: Thu Aug 17, 2006 6:10 pm

THE SOLUTION

Postby theblase » Thu Sep 07, 2006 9:54 am

Change this code in "admin.content.php"

From:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;

To:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c" //, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . "\n LEFT OUTER JOIN #__categories AS cc ON c.catid=cc.id"
   . "\n LEFT OUTER JOIN #__sections AS s ON cc.section=s.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;


This solution will help your life!  8)

THB
--
Regards,
TheBlase

User avatar
ikez
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Nov 08, 2005 1:38 pm
Location: Indonesia
Contact:

Re: DB function failed with error number 1054

Postby ikez » Wed Aug 22, 2007 4:13 am

wow, this is helpful. thanks theblase
-m/d-

Immortal King
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Sep 16, 2007 1:12 pm

Re: THE SOLUTION

Postby Immortal King » Wed Nov 14, 2007 7:03 pm

theblase wrote:Change this code in "admin.content.php"

From:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;

To:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c" //, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . "\n LEFT OUTER JOIN #__categories AS cc ON c.catid=cc.id"
   . "\n LEFT OUTER JOIN #__sections AS s ON cc.section=s.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;


This solution will help your life!  8)

THB


But my admin_content.php file has a different line: I have "\n FROM #__content AS c" instead of "\n FROM #__content AS c, #__categories AS cc, #__sections AS s" where all those fixes seem to focus.

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16584
Joined: Thu Aug 18, 2005 7:13 am

Re: DB function failed with error number 1054

Postby Tonie » Thu Nov 15, 2007 8:57 am

Probably because this was for 1.0.8, and you are using 1.0.13?

Immortal King
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Sep 16, 2007 1:12 pm

Re: DB function failed with error number 1054

Postby Immortal King » Sun Nov 18, 2007 2:47 am

Yes I am. How do I fix my problem then?

AndyWhitelaw
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Dec 14, 2007 5:25 pm

Re: DB function failed with error number 1054

Postby AndyWhitelaw » Fri Dec 14, 2007 5:33 pm

I have the same problem as listed above but I am using 1.0.13 and my admin_content.php is different.
Anyone know what the replacement test for 1.0.13 is?

Thanks

whataslacker
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Oct 24, 2007 5:11 pm

Re: THE SOLUTION

Postby whataslacker » Wed Dec 26, 2007 9:13 pm

Where do we find admin.content.php?


theblase wrote:Change this code in "admin.content.php"

From:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;

To:

Code: Select all

$query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c" //, #__categories AS cc, #__sections AS s"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . "\n LEFT OUTER JOIN #__categories AS cc ON c.catid=cc.id"
   . "\n LEFT OUTER JOIN #__sections AS s ON cc.section=s.id"
   . ( count( $where ) ? "\nWHERE " . implode( ' AND ', $where ) : '' )
   . $order
   . "\n LIMIT $pageNav->limitstart,$pageNav->limit"
   ;


This solution will help your life!  8)

THB

whataslacker
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Oct 24, 2007 5:11 pm

Re: DB function failed with error number 1054

Postby whataslacker » Sat Jan 05, 2008 11:05 pm

Sorry but working on 1.0.11 and the code looks like this:

Code: Select all

   $query = "SELECT c.*, g.name AS groupname, cc.name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author"
   . "\n FROM #__content AS c"
   . "\n LEFT JOIN #__categories AS cc ON cc.id = c.catid"
   . "\n LEFT JOIN #__sections AS s ON s.id = c.sectionid"
   . "\n LEFT JOIN #__groups AS g ON g.id = c.access"
   . "\n LEFT JOIN #__users AS u ON u.id = c.checked_out"
   . "\n LEFT JOIN #__users AS v ON v.id = c.created_by"
   . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id"
   . ( count( $where ) ? "\n WHERE " . implode( ' AND ', $where ) : '' )
   . $order
   ;


So this fix I keep getting pointed to does not work for the xdtratings error I keep getting
DB function failed with error number 1054
Since my server move us to mySQL5
So I still need help! PLEASE  :'(

PavlovaPete
Joomla! Explorer
Joomla! Explorer
Posts: 473
Joined: Fri Aug 19, 2005 5:30 am

Re: DB function failed with error number 1054

Postby PavlovaPete » Wed Jan 09, 2008 4:16 am

Hi all,

our ISP had a RAID controller failure :o recently and had to move the site files to a new server. We are slowly working our way through the reinstallation and reconfiguration. Mostly things are going OK. However we have an issue with com_events and com_phpmyadmin.

com_events is giving us the "DB function failed with error number 1054" message discussed in this thread. phpmyadmin is not working at all.

I'm not that keen to hack the core.

I'm currently asking our ISP when they upgraded php - I can see that we are now using php 5.2.5 - I wonder if this might be the cause of the problems?

If anyone can throw some light on this issue I'd be most appreciative.

Thanks

Cheers
viewtopic.php?f=428&t=272481 Forum Post Assistant - If you are serious about wanting help, you will use this tool when you post.
Signature rules - Literal URLs Only.

PavlovaPete
Joomla! Explorer
Joomla! Explorer
Posts: 473
Joined: Fri Aug 19, 2005 5:30 am

Re: DB function failed with error number 1054

Postby PavlovaPete » Thu Jan 10, 2008 3:25 am

OK - so it wasn't php but a MySQL upgrade that caused the problem (at least for the events component)

I've posted the solution for the events component here - http://forum.joomla.org/index.php/topic ... msg1148924

Looks like you have to wrap the FROM clause in brackets e.g. FROM (#__events AS a, #__categories AS cc)

HTH

Cheers
viewtopic.php?f=428&t=272481 Forum Post Assistant - If you are serious about wanting help, you will use this tool when you post.
Signature rules - Literal URLs Only.

User avatar
frodojrr
Joomla! Explorer
Joomla! Explorer
Posts: 270
Joined: Sat Sep 30, 2006 4:29 am
Location: Park Forest, IL
Contact:

Re: DB function failed with error number 1054

Postby frodojrr » Mon Jan 14, 2008 2:45 am

I am running Joomla 1.0.13, and just started getting this error for the first time today when I installed sh404SEF.  In the administrative panel, when I click on some of the items, like "View/Edit SEF Urls", I get the following error:
DB function failed with error number 1054
Unknown column 'rank' in 'order clause' SQL=SELECT * FROM jos_redirection WHERE `dateadd` = '0000-00-00' ORDER BY `oldurl`, `rank` ASC LIMIT 0,50

This thread started a while back.  Would any of the solutions proposed apply to my situation?
Gary Kopycinski
Editor & Publisher
eNews Park Forest
http://www.enewspf.com

deterius
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Wed Mar 28, 2007 12:03 am

Re: DB function failed with error number 1054

Postby deterius » Tue Feb 12, 2008 1:52 am

Im having roughly the same issue-
every time I try to update a profile I get this error:

(Joomla! 1.0.12 Stable)

Code: Select all

DB function failed with error number 1054
Unknown column 'cb_internationalbusinessresearchprogramscontactper' in 'field list' SQL=UPDATE jos_comprofiler SET
`user_id`='76',`approved`='1',`confirmed`='1',`address2`='Honolulu, HI 96822',`cb_studentexchangecoordinator`='Rikki
Mitsunaga',`school_name`='University of Hawaii',`email2`='',`department`='Shidler College of
Business',`website`='http://www.shidler.hawaii.edu/',`contact1`='Dr. Shirley
Daniel',[email protected]',`contact2`='',`title2`='',`title1`='Pacific Asian Management Institute
Director',`country`='USA',`address`='2404 Maile Way, A303',`phone`='(808) 956-8041',`fax`='(808) 956-9685',`cb_extitle`='Test -
Please Fill',`cb_exschool`='Chulalongkorn, National Taiwan University, Shanghai University of Finance and Economics',`cb_exemail`='Test -
Please Fill',`cb_scholinfo`='',`cb_schoolupdates`='Test of a School update, please
replace.',`cb_fafirstname`='',`cb_falastname`='',`cb_fatitle`='',`cb_fadesc`='',`cb_facountry`='',`cb_fatelephone`='',`cb_fafax`='',
`cb_faaddress`='',`cb_faschoolname`='',`cb_faemail`='',`cb_fainterest`='',`cb_facultyresearchcontact`='',
`cb_facultyresearchcontacttitle`='',`cb_facultyresearchcontactemail`='',`cb_internationalbusinessresearchprogramstitle`='',`cb_internationalbusinessresearchprogramswebsite`='',`cb_internationalbusinessresearchprogramscontactper`='',`cb_internationalbusinessresearchprogramsemailconta`='',`cb_internationalbusinessresearchstaffname`='',`cb_internationalbusinessresearchstafftitle`='',`cb_internationalbusinessresearchstaffemail`='',`firstname`='',`middlename`='',`lastname`='' WHERE id='76'
SQL =

UPDATE jos_comprofiler SET `user_id`='76',`approved`='1',`confirmed`='1',`address2`='Honolulu, HI
96822',`cb_studentexchangecoordinator`='Rikki Mitsunaga',`sch


Return to “Administration - 1.0.x”

Who is online

Users browsing this forum: No registered users and 8 guests