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

TOPIC:

SQL Query - sort of off topic - but not. 05 Feb 2012 09:50 #1175

  • iconvisual
  • iconvisual's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Keen Joomla! 1.7 Developer
  • Posts: 53
  • Thank you received: 5
Hi All,

trying to struggle with what should be a simple SQL solution. Apologies that this isn't 100% related to j-cook however it's part of my j-cook projects.

I need to work with 2 Tables; jos_users and my own jos_easypropmgr_landlords. Now due to my poor planning I do not have a relationship between the two, and I should - I need one.

Keep in mind that I'm working with legacy (existing system) data.

Every landlord needs to be a jos_user.

So with jos_easypropmgr_landlords I have a landlord_id which already exists (legacy) and a landlord_emailaddress (same).

With the exception of the 'admin' user in jos_users I could easily trash all records in the existing jos_users table.

Should I perform some sort of sync where I use an UPDATE SQL or INSERT so that the jos_users Table is rebuilt with a jos_users.id = landlord_id? And could some kind soul tell me how to do so with SQL please?? (Im a noob).

Or is there a better way to ensure that I can achieve:
SELECT
					landlord_id
				FROM
					jos_easypropmgr_landlords
				WHERE
					landlord_id = {the jos_users.id of current user logged in}
				LIMIT
					1

Sorry for long post, and sincerely appreciate any suggestions.

Kind Regards,

Edward.
Keen Joomla! and PHP/MySQL developer. Excited about J-Cook.

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

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

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started