Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

SQL Error - Bug? 05 Nov 2012 21:27 #5018

I came across this. I added the user GID field to a view form. Note the Unknown column.

Unknown column '_created_by_.gid' in 'field list' SQL=SELECT a.id,a.admin_notes,a.asset_name,a.created_by,a.creation_date,a.encoder,a.expires,a.key_file,a.mac_address,a.modification_date,a.modified_by,a.product,_created_by_.name AS `_created_by_name`,_created_by_.lastvisitDate AS `_created_by_lastvisitDate`,_created_by_.email AS `_created_by_email`,_created_by_.usertype AS `_created_by_usertype`,_created_by_.gid AS `_created_by_gid`,_created_by_.registerDate AS `_created_by_registerDate`,_product_.name AS `_product_name`,_encoder_.name AS `_encoder_name`,_modified_by_.name AS `_modified_by_name` FROM mbs_skm_licenses AS a LEFT JOIN `mbs_users` AS _created_by_ ON _created_by_.id = a.created_by LEFT JOIN `mbs_skm_products` AS _product_ ON _product_.id = a.product LEFT JOIN `mbs_skm_encoders` AS _encoder_ ON _encoder_.id = a.encoder LEFT JOIN `mbs_users` AS _modified_by_ ON _modified_by_.id = a.modified_by WHERE a.id = 1
--
Jerry Benton

Please Log in or Create an account to join the conversation.

Last edit: by jcbenton.

Re: SQL Error - Bug? 15 Nov 2012 07:52 #5369

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @jcbenton,

It looks like you're creating a table that in large part recreates many fields ported from the users' table.

I don't believe you can do this in this way. I believe the solution would be to drop all of the user-related fields except for their PK (_created_by_.id) then, in your layouts, call all of the related user data you wish to display.

If your goal is to be creating users and adding additional user information to the core user data (extending the core) then I would advise creating a user profile plugin. Joomla has one built in called profile. You can update this to suit your needs. There is some good info here on this: www.inmotionhosting.com/support/edu/joomla-25/user-profile

Hope this helps!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: SQL Error - Bug? 15 Nov 2012 09:37 #5372

Uh no....

One field (created_by) is a foreign key to the the user table. In a fly view I can drop in user name, email, etc. When I dropped in GID, it failed.
--
Jerry Benton

Please Log in or Create an account to join the conversation.

Re: SQL Error - Bug? 15 Nov 2012 14:14 #5382

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Sorry @jcbenton, read this very quickly before I left today... It's just that you said you added it to a view form in your post.

Have you tried locally?

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: SQL Error - Bug? 21 Nov 2012 09:32 #5547

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
#__users.gid = Joomla 1.5
DO NOT USE IT ANYMORE

My virtual user table should avoid this one.
Sorry.

Moved in Opened Tickets.
Coding is now a piece of cake
The following user(s) said Thank You: BTB300

Please Log in or Create an account to join the conversation.

Re: SQL Error - Bug? 09 Dec 2012 08:07 #5942

Had this problem today thought it was a filter...
Thanks for the heads up :)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.111 seconds

  Excellent Tool ! This tool will save you a lot of time writing the same old structure. I've used others but this is really nice for a quick start. Makes a 3 hour task a 15 minute one. Thanks for this extension
dickrundell (JED)
         

Get Started