Piwik change event action name - matomo

Is there simple way to change event action name by site id in piwik?
Or everything must be done manually in database?
Or transfer one action name to another?
There is a way to delete everything by site id
DELETE FROM piwik_log_visit WHERE idsite = X;
DELETE FROM piwik_log_link_visit_action WHERE idsite = X;
DELETE FROM piwik_log_conversion WHERE idsite = X;
DELETE FROM piwik_log_conversion_item WHERE idsite = X;

As far as I know, this is not possible in the latest version of Piwik. You need to do that manually when using phpmyadmin to connect to your database.
sorry bro

Related

New column in my table not visible after adding and publishing

I have an existing table => zoo[design] I add to it new column:
zooName nvarchar(50) allow null
Then I updated the server but when i go in zoo[data] and push refresh I can't see the zooName there.
But if I make new Query
select * from zoo
it's display for me the zooName but i can't edit it in the zoo[data]
I closed the project and open it again then it's ok
I don't want to open and close the project every time I need to add new row.
Refresh on your database node from Object Explorer if you are using MSSQL.

PhpMyAdmin does not list a database I have access to

When I start phpMyAdmin, it does not list a database I have access too.
I know that the db exists and that I have access too, because its is the database used by one of my Joomla site.
I picked up the credential from my joomla configuration to the config.inc.php file.
Here is the file:
$cfg['Servers'][$i]['verbose'] = 'SQL9_MODULES';
$cfg['Servers'][$i]['host'] = 'sql9.modules';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'xxxx';
$cfg['Servers'][$i]['password'] = 'yyy';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
I tried as mentionned in other post this command :
SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA;
The results is empty.
I have also started the "Synchronize" function from my joomla database to my joomla database and pma found all the tables !!!!
The I tried to write some selects directly on the tables but I got a
#1046 - No database selected
Last remark, this is shared hosting, so I cannot connect as root to grand me some extra privileges !!
Thanks for your help
MySQL version : 5.1.66-0+squeeze1-log - (Debian)
phpMyAdmin version : 3.5.3
Update:
SHOW GRANTS FOR CURRENT_USER
gives
GRANT USAGE ON *.* TO 'xxxx'#'%' IDENTIFIED BY PASSWORD '*****************'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `xxxx`.* TO 'xxxx'#'%'
Any missing grants ?
Got answer from my ISP support. Needed to add the following line in the configuration:
$cfg['Servers'][$i]['only_db'] = 'my-database';
Now it works.

how can I loop to update record in sql server

I have database records to store page urls but we have problem in deployment the developer using localhost to store page filed in database because of that we end up with
http://localhost:8080/wow/page1.aspx
http://localhost:8080/wow/page2.aspx
http://localhost:8080/wow/page3.aspx
just wondering can i write Tsql to loop throw record to remove the localhost from url and updating the new url
You don't need a loop, a simple UPDATE will do the trick. E.g.
UPDATE WEB_TABLE SET URL_FIELD = REPLACE(URL_FIELD, 'localhost:8080', 'www.mysite.com')
You can execute a SQL update query using the replace method.
UPDATE [your table] SET [your field] = REPLACE([your field],'http://localhost:8080','')
That will update them all in one go.
OR, if you want to loop you could use a CURSOR

Facebook Credits API PHP - Update user_id in mySql database after purchase

I have an app where I want users to be able to buy in-game credits called coins.
I have set my callback url, and can make a purchase, I get an order_id and settled from the callback, but how do I update the users row in my mySql database after they have made the purchace.
Kinda how my mySql DB looks
ID......FBID............Name..........Coins
7.......1000***797....John..............0
After the user has bought 200 coins for 1 credit, I would like to do this
$SQL = "UPDATE tb_users SET Coins = Coins+200 WHERE FBID = '$usernumber'";
$result = mysql_query($SQL);
But how and where am I supposed to do that? Is it in the callback.php file or in the index.php file after "var callback = function(data)".
I can't seem to pass the user_id from the form on the index to callback.php
So how do I do that, and if that is possible, am I supposed to update my database in the callback.php file??
Nevermind found this out. You can get the info about the user via API the normal way and update the DB in callback.php after "settled".

SQL Server CE database and ADO.Net Entity Framework - data not saving

I have a SQL Server CE database file and I have ADO.NET Entity Framework object named History. I perform the following to get the latest ID:
var historyid = (from id in db.Histories // Get the current highest history Id
select (Int32?)(id.Id)).Max();
HistoryID = Convert.ToInt32(historyid);
if (HistoryID == 0) // No current record exists
{
HistoryID = 1; // Set the starter history Id
}
(Not the best way, but it is just to test).
This works well and returns the correct value (If I manually enter an ID of 1, it returns 1, same with 2 etc..)
The issue is with the following code:
History history = new History();
history.Id = 1;
history.SoftwareInstalled = "test";
db.AddToHistories(history);
db.SaveChanges();
The above works and runs through fine, but the changes are not saved to the database! Why is this?
Here is my db variable: dbDeSluggerEntities db = new dbDeSluggerEntities();
Thanks.
Edit: Here is an update: I noticed when I run the program and debug it, it shows that a history has been created and inserted and also gives an error of the primary key already existing, this happens each time I run the application (over and over). However, when I go to server explorer and right click the db and select 'Show Table Data' it shows no data.. When the program is run again, there is no primary key error or history's showing in the debug!
I was having exactly the same problem. By default the database is copied into your bin folder when you run the app and that is used.
My solution was to go into the properties of the db and set it to never copy and to put a full file path to the database in the connection string in the apps config file.

Resources