mercredi 20 juillet 2016

Is it possible to send push notification only to users who have the current install apk?

I have an Android apk, more than 200 people installed that apk so far, some people uninstalled this apk. Is it possible to mark in MYSQL which user has operational apk on his device? And then have system send push notifications only to those users who have operational apk.

please advise, user status:
enter image description here

Will exists clause compare the records?

I have two tables as

tb1(field1 int) containing 1,2,3,4
tb2(field2 int) containing 4,12,19,30

When I run

select * from tb1 where exists(select * from tb2 ); 

I'm getting the entire values from tb1. Why it's so? I thought that the it will bring only 4 as it is present in both tables. Now I'm totally confused with the exists clause. I want to know what the exists clause is doing here ? Please help me.

How to use if else in mysql where clause

I want to query data in mysql like:

$cid=$_POST["cid"];
$room_id=$_POST["room_id"];
$time=$_POST["time"];

$reuslt=$this->db-query("SELECT * FROM mytable WHERE if($cid is not null){then check cid=$cid} else{don't check} AND if($room_id is not null){then check room_id=$room_id} else{don't check} AND if($time is not null){then check time=$time} else{don't check}");

How could I writ the correct sql to query data?

I am getting an error saying "Overflow" in MS Access query when I try to use CDate

SELECT DISTINCT IWTUSER_ALARMS.NAME, IWTUSER_ALARMS.AID, IWTUSER_ALARMS.DUR, 
   Int(CInt([DUR])/86400) AS DAYS, Int((CInt([DUR]) Mod 86400)/3600) AS HOURS, 
   Int(((CInt([DUR]) Mod 86400) Mod 3600)/360) AS MINUTES, 
   Int((((CInt([DUR]) Mod 86400) Mod 3600) Mod 360)/60) AS SECONDS
FROM IWTUSER_ALARMS
   WHERE (((CDate(Format([IWTUSER_ALARMS].[ITIME],"0000-00-00 00:00:00 ")))>=Date()-10))
GROUP BY IWTUSER_ALARMS.NAME, IWTUSER_ALARMS.AID, IWTUSER_ALARMS.DUR, 
   CInt([DUR])/86400, CInt([DUR]) Mod 86400, (CInt([DUR]) Mod 86400) Mod 3600, 
   ((CInt([DUR]) Mod 86400) Mod 3600) Mod 360
ORDER BY IWTUSER_ALARMS.DUR DESC;

Using large data sets

I have created a table with just field names and I have the data saved to my computer but now want to code to input it into the table with currently only the field names. (it is a couple million records so going by columns doesn't seem to work)

  • I tried using an INSERT INTO new_table SELECT FROM original_table
  • I've also tried just copying and pasting the values into the script but it is too large

MYSQL Query Issue in Codeigniter

High friends,

could you please help me to check date from datetime on mysql query in codeigniter

like

return $this->db->select("*")->from($this->db->dbprefix."notification")->where('date',date('Y-m-d'))->get()->result();

in database date is in this format date('Y-m-d h:i:s'); i am also trying by using like it is not working for me please anybody help me

phpmyadmin enable drop database statement

I was alerted by my hosting provider that I exceed my 1000 table limit. I have a lot of databases and would like to delete more at once. Unfortunaltley they don't have a multiselect feature so I decided to use a query in phpmyadmin.

When I try something like DROP database some_name I get DROP DATABASE statements are disables

Does anyone know if it's possible to enable them or a different way to delete multiple databases?