How to fix virtuemart? - joomla

When I am trying to configure shop details (virtueamart), I am receiving this message every time
JUser: :_load: Unable to load user with ID: 830 and can not save the changes.
Virtueamart :
You have the latest version
2.0.22c

This is due to user id 830 is mismatched in DB .
that is from #__users tables this 830 is removed and some other tables this user id exists.
Please check all the tables that related to user data like, #__user_details,#__virtuemart_userinfo, order info etc.
Also make sure this user id removed from all user data related tables. This may happen due to manual removal of users data from tables.
Other wise you have to create an entry in user table with this id.
Hope its get fixed..

Related

Data deleted from parse instllation table

My app is inserting/updating parse instllation table when user do login.
Yesterday 20-10-2015, i had 5 records in installtion table, suddenly 2 records have been deleted?.
I was not able to send push, when I checked I found 2 records for 2 users have been deleted from the instllation table!!
Any Idea what could be the reason?
Deleting a record from Installation class requires master key. This means you either have to delete the records directly from Parse dashboard or use your master key.

Best way to check duplicate record when insert DB record thorugh spring data jpa

Our user can create customer record in different places. After he / she search for customer by ID no. and no customer record is found in the database, he / she will enter the customer detail to create the customer record. However, it is expect that he / she should not able to save his / her customer record if another ID No exist in the database. As thousands of user may create customer in the same time, it is expected that our system should able to report the duplicate record error to our user.
By using spring data, we use the following code to save the customer information.
customerRepository.save(customer);
May I know any good way to detect the duplicate record error when insert data to database?
We may have met similar problem as this post

Oracle Database Design View or Table?

I'm new to database design and faced a problem while trying to design one. Here's my system:
There are 3 different softwares (SW_A, SW_B, SW_C) and 500-600 users. Each user can use any of the softwares and do some work. Each work is sent to the database approx. 6 times per minute. (Randomly for users and software)
I want a database to keep all user actions related to the softwares for archive and also want to keep track instant actions for all users related to these softwares. (Only the latest action for distinct users for each software)
So I designed sth. like that:
Table: SW_X_DATA_ARCHIVE
Columns :
UserID
Data_Date
SW_A_ActionID
Table: SW_X_INSTANT_DATA
Columns:
UserID
Data_Date
SW_X_ActionID
When a new data comes, it updates INSTANT_DATA table's related row if that UserID exists, inserts new row with UserID and data if not. Then inserts the same data to DATA_ARCHIVE table.
The question is: Is there a better way for this kind of work? Views maybe?
(I've read sth. about materialized views but not sure how to use it here.)
Thanks
Only the latest action for distinct users for each software
Your INSTANT table should have a unique composite key on (USERID,SOFTWAREID) so that it is not possible to have more than one row relating to a user's use of a software.
The ARCHIVE table does not require such a unique key or constraint.
You would insert into INSTANT if a row for (USERID, SOFTWARE) does not exist, or update the row if it already exists.
Typically, an insert/update trigger would be placed on the INSTANT table, to insert a row into ARCHIVE whenever a change happens to INSTANT.
EDIT: alternatively, you could maintain a single table, and have a view that selected only the latest action per user per software. You'd need to timestamp every action and place a composite index (non-unique) on (USERID,SOFTWAREID). The decision on which approach to take might be based on relative performance. I would tend to favor the trigger if the Latest Action information was needed frequently.

Show all users currently signed in?

I am assuming I cannot do this using sessions but rather the DATABASE. So the user would sign in, it would set their TIMESTAMP and I display that from the database. Then it becomes deleted when the user logs out or their session is terminated. How would the code look for this?
The better question is, is my logic correct? Would this work? Does this make sense?
By default application servers store session data in temporary files on the server.
By storing session data in a database table you are able to create an interface that will show information about the users that are logged in. Apart from that, using this (database) approach is a serious advantage if you need to scale your application by adding more than one server.
One of the most popular ways to implement such a functionality is to create a session table containing your users' session data. This may look like:
create table session (
id number primary key,
data varchar(240),
timestamp date
);
The data column stores all the session data in a serialized form this is deserialized each time a user requests the data.
Serialization and deserialization may have inbuilt support depending on the platform you are using. For example, if you are using PHP, the functions session_encode and session_decode may be found useful.
You can't find out when a user logs out in PHP and the Javascript workarounds are a bit far from a stable solution.
A couple of things you need to do: Create a column in your user table called last_activity and update their last_activity to the current time whenever a user loads a page.
For a list of who's online, query the db for users with last_activity values more recent than 10 or 20 or whatever minutes ago.
To update the last_activity column use:
UPDATE users SET last_activity=CURRENT_TIMESTAMP() WHERE id=2
For a list of users online
SELECT * FROM users where last_activity >= (CURRENT_TIMESTAMP()-(60*20))

How do i do the following task with quickbase?

How do i know the users who added the record in quickbase table or who have the permission to add ,Edit or delete the record or how can i check the flow of adding a data into quickbase tables ?
When you create a table in quickbase, it defaults to creating a field that display which user account has inserted the record. The default names are Record Owner and Last Modified By.
Record Owner is for the user who initially created the record.
Last Modified By is for the user account that last modified the record.
Date Created will tell you when it was created and Date modified will tell you when it was last modified. These fields are not default in reports. I would make a custom report that only the administrators can see to follow the tracking of the flow of records adding and editing.
The help file at this link QuickBase Help for User Control will help you understand how to manage your user accounts and also know who has access to what for which application.
Hope this helps.

Resources