Search Results

Search found 36111 results on 1445 pages for 'mysql update'.

Page 65/1445 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Update function

    - by kosmaks
    Hello everyone! I try to learn java for android devices.. i have to create the update function. But still have one question: How???? in class root public void update(){ maindebug("update"); // This is my debug function } public void run(){ while(isRunning){ // isRunning is a boolean variable SystemClock.sleep(100); update(); } } and inside onCreate run(); but it doesnt work :(

    Read the article

  • Strange Play Framework 2.2 exceptions after trying to add MySQL / slick

    - by Mike Cialowicz
    I'm working on a Play 2.2 application, and things have gone a bit south on me since I've tried adding my DB layer. Below are my build.sbt dependencies. As you can see I use mysql-connector-java and play-slick: libraryDependencies ++= Seq( jdbc, anorm, cache, "joda-time" % "joda-time" % "2.3", "mysql" % "mysql-connector-java" % "5.1.26", "com.typesafe.play" %% "play-slick" % "0.5.0.8", "com.aetrion.flickr" % "flickrapi" % "1.1" ) My application.conf has some similarly simple DB stuff in it: db.default.url="jdbc:mysql://localhost/myDb" db.default.driver="com.mysql.jdbc.Driver" db.default.user="root" db.default.pass="" This is what it looks like when my Play server starts: [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 (Server started, use Ctrl+D to stop and go back to the console...) [info] Compiling 1 Scala source to C:\bbq\cats\in\space [info] play - database [default] connected at jdbc:mysql://localhost/myDb [info] play - Application started (Dev) So, it appears that Play can connect to the MySQL DB just fine (I think). However, I get this exception when I make any request to my server: [error] p.nettyException - Exception caught in Netty java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurren t/ExecutionContext; at play.core.Invoker$.<init>(Invoker.scala:24) ~[play_2.10.jar:2.2.0] at play.core.Invoker$.<clinit>(Invoker.scala) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$Implicits$.defaultContext$lzycompu te(Execution.scala:7) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$Implicits$.defaultContext(Executio n.scala:6) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$.<init>(Execution.scala:10) ~[play _2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$.<clinit>(Execution.scala) ~[play_ 2.10.jar:2.2.0] The odd thing is that the 2nd request (to the exact same URL, same controller, no changes) comes back with a different error: [error] p.nettyException - Exception caught in Netty java.lang.NoClassDefFoundError: Could not initialize class play.api.libs.concurr ent.Execution$ at play.core.server.netty.PlayDefaultUpstreamHandler.handleAction$1(Play DefaultUpstreamHandler.scala:194) ~[play_2.10.jar:2.2.0] at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(Pla yDefaultUpstreamHandler.scala:169) ~[play_2.10.jar:2.2.0] at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageRecei ved(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na] at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived (HttpContentDecoder.java:108) ~[netty-3.6.5.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:29 6) ~[netty-3.6.5.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessage Received(FrameDecoder.java:459) ~[netty-3.6.5.Final.jar:na] The URL / controller that I'm requesting just renders a static web page and doesn't do anything of any significance. It was working just fine before I started adding my DB layer. I'm rather stuck. Any help would be greatly appreciated, thanks. I'm using Scala 2.10.2, Play 2.2.0, and MySQL Server 5.6.14.0 (community edition).

    Read the article

  • Disable mysql startup in Ubuntu 10.04

    - by Bryan
    Hi all, I want to prevent mysql from starting in ubuntu 10.04 I have used update-rc.d -f mysql remove and confirmed that there is no link to the /etc/inid.d/mysql script from any of the rc?.d directories. I also ran sysv-rc-conf and it shows me that mysql is being called as part of the rc.d scripts. It is still starting on boot. How do I disable it? Regards, Bryan

    Read the article

  • problem importing data into older mysql version

    - by conandor
    I dump data from MySQL version 5.1.30 from server 1 # mysqldump mydb1 > mydb1.sql Then I import it to server 2 which have MySQL version 5.1.24-rc However I got an error important halfway. # mysql mydb1 < mydb1.sql ERROR 1064 (42000) at line 1984: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''9012345678' at line 1 Any idea how I can solve it?

    Read the article

  • In MySQL, what is the most effective query design for joining large tables with many to many relatio

    - by lighthouse65
    In our application, we collect data on automotive engine performance -- basically source data on engine performance based on the engine type, the vehicle running it and the engine design. Currently, the basis for new row inserts is an engine on-off period; we monitor performance variables based on a change in engine state from active to inactive and vice versa. The related engineState table looks like this: +---------+-----------+---------------+---------------------+---------------------+-----------------+ | vehicle | engine | engine_state | state_start_time | state_end_time | engine_variable | +---------+-----------+---------------+---------------------+---------------------+-----------------+ | 080025 | E01 | active | 2008-01-24 16:19:15 | 2008-01-24 16:24:45 | 720 | | 080028 | E02 | inactive | 2008-01-24 16:19:25 | 2008-01-24 16:22:17 | 304 | +---------+-----------+---------------+---------------------+---------------------+-----------------+ For a specific analysis, we would like to analyze table content based on a row granularity of minutes, rather than the current basis of active / inactive engine state. For this, we are thinking of creating a simple productionMinute table with a row for each minute in the period we are analyzing and joining the productionMinute and engineEvent tables on the date-time columns in each table. So if our period of analysis is from 2009-12-01 to 2010-02-28, we would create a new table with 129,600 rows, one for each minute of each day for that three-month period. The first few rows of the productionMinute table: +---------------------+ | production_minute | +---------------------+ | 2009-12-01 00:00 | | 2009-12-01 00:01 | | 2009-12-01 00:02 | | 2009-12-01 00:03 | +---------------------+ The join between the tables would be engineState AS es LEFT JOIN productionMinute AS pm ON es.state_start_time <= pm.production_minute AND pm.production_minute <= es.event_end_time. This join, however, brings up multiple environmental issues: The engineState table has 5 million rows and the productionMinute table has 130,000 rows When an engineState row spans more than one minute (i.e. the difference between es.state_start_time and es.state_end_time is greater than one minute), as is the case in the example above, there are multiple productionMinute table rows that join to a single engineState table row When there is more than one engine in operation during any given minute, also as per the example above, multiple engineState table rows join to a single productionMinute row In testing our logic and using only a small table extract (one day rather than 3 months, for the productionMinute table) the query takes over an hour to generate. In researching this item in order to improve performance so that it would be feasible to query three months of data, our thoughts were to create a temporary table from the engineEvent one, eliminating any table data that is not critical for the analysis, and joining the temporary table to the productionMinute table. We are also planning on experimenting with different joins -- specifically an inner join -- to see if that would improve performance. What is the best query design for joining tables with the many:many relationship between the join predicates as outlined above? What is the best join type (left / right, inner)?

    Read the article

  • Query to find the data for every month of last year from the given date using mysql?

    - by Salil
    Hi All, I want data for the the last 1 year from the given date For ex:- I have date "2013-06-01" and i want data as follows also data i want is from three table using Group By or something else Month             Amount         Total_Data June 2013     100                5 May 2013       80                  4 -                     100                5 -                     100                5 July 2012       10                  2 I try following query but didn't workout SELECT DATE_FORMAT(rf.period, '%M %Y') as Month , sum(p.amount * ((100-q.amount)/100)) as Amount ,count(distinct q.label_id) as Total Data FROM table1 rf , table2 p , table3 q ,table4 a where rf.period BETWEEN '2013-06-01' AND '2013-06-01' and q.royalty_period BETWEEN '2013-06-01' AND '2013-06-01' and a.id = q.album_id and p.file_id = rf.id and p.upc = a.upc and p.local_revenue is not null GROUP BY Month Thanks in Advance, Salil Gaikwad

    Read the article

  • How to test PHP in MySQL Strict

    - by Ben Sinclair
    I had a client who had MySQL Strict which brought up a few errors in my MySQL code... I didn't even know there was a MySQL Strict. I've fixed up a lot of the issues but I want to run some further tests on my local server. How do I enable MySQL Strict for testing purposes and then disable it when I no longer want it?

    Read the article

  • MYSQL Installation Problem...

    - by Gopal
    I was downloaded the MYSQL from this link http://dev.mysql.com/downloads/mysql/ But i cannot able to find the Installation file... How to create database & Table in mysql? It will work like SQL server or ? Need Help

    Read the article

  • MySQL Connector Linker Problem

    - by Layne
    Hey, I'm trying to compile a program with the MySQL C++ Connector but somehow I can't get the linking right. The errors I get are: mysql/lib/libmysqlcppconn.so: undefined reference to `std::ios_base::ios_base()@GLIBCPP_3.2'.... etc locations: libmysqlcppconn.so: mysql/lib/ libmysqlclient.so: /usr/lib/ I tried to follow the tutorial on mysql and some other pages but the results where the same, maybe I missed something.

    Read the article

  • How to Create MySQL Query to Find Related Posts from Multiple Tables?

    - by Robert Samuel White
    This is a complicated situation (for me) that I'm hopeful someone on here can help me with. I've done plenty of searching for a solution and have not been able to locate one. This is essentially my situation... (I've trimmed it down because if someone can help me to create this query I can take it from there.) TABLE articles (article_id, article_title) TABLE articles_tags (row_id, article_id, tag_id) TABLE article_categories (row_id, article_id, category_id) All of the tables have article_id in common. I know what all of the tag_id and category_id rows are. What I want to do is return a list of all the articles that article_tags and article_categories MAY have in common, ordered by the number of common entries. For example: article1 - tags: tag1, tag2, tag3 - categories: cat1, cat2 article2 - tags: tag2 - categories: cat1, cat2 article3 - tags: tag1, tag3 - categories: cat1 So if my article had "tag1" and "cat1 and cat2" it should return the articles in this order: article1 (tag1, cat1 and cat2 in common) article3 (tag1, cat1 in common) article2 (cat1 in common) Any help would genuinely be appreciated! Thank you!

    Read the article

  • MYSQL - Selecting a specific date range to get "current" popular screensavers.

    - by Joe
    Let's say I have a screensaver website. I want to display the CURRENT top 100 screensavers on the front page of the website. What I mean is, "RECENT" top 100 screensavers. What would be an example query to do this? My current one is: SELECT * FROM tbl_screensavers WHERE WEEK(tbl_screensavers.DateAdded) = WEEK('".date("Y-m-d H:i:s",strtotime("-1 week"))."') ORDER BY tbl_screensavers.ViewsCount, tbl_screensavers.DateAdded This will select the most viewed ("tbl_screensavers.ViewsCount") screensavers that were added ("tbl_screensavers.DateAdded") in the last week. However, in some cases there are no screensavers, or less than 100 screensavers, submitted in that week. So, how can I perform a query which would select "RECENT" top 100 screensavers? Hopefully you have an idea of what I'm try to accomplish when I say "RECENT" or "CURRENT" top screensavers. -- aka. the most viewed, recently - not the most viewed, all-time.

    Read the article

  • Convert a MSSQL database to MYSQL database

    - by soldieraman
    Alright so I want to convert an already exist MSSQL database (2005) to a MYSQL database. There is nothing extraordinary to be done The only things I need to achieve is Recreate the tables Transfer data Relationships would be nice but not necessary No views, no sprocs, no functions. Any easy way to do this. Also do you know of any DST (Database Synchronization Tool) which would let me do MSSQL to MYSQL MYSQL to MYSQL MSSQL to MSSQL (I know there is SQL Delta for this)

    Read the article

  • MySQL to fill in missing dates when using GROUP BY DATE(table.timestamp) without joining on temporar

    - by twmulloy
    Hello, after reading through a couple similar Qs/As I haven't quite found the solution I'm looking for. The table data I have is GROUP BY DATE(timestamp) and returning a count, example result: [timestamp] = 2010-05-12 20:18:36 [count] = 10 [timestamp] = 2010-05-14 10:10:10 [count] = 8 Without using a temporary table, or calendar table is there a way to fill in those missing dates? so that with the same table data would return (adding the bold row): [timestamp] = 2010-05-12 20:18:36 [count] = 10 [timestamp] = 2010-05-13 00:00:00 [count] = 0 [timestamp] = 2010-05-14 10:10:10 [count] = 8 Thanks!

    Read the article

  • I am not able to create foreign key in mysql Error 150. Please help

    - by Shantanu Gupta
    i am trying to create a foreign key in my table. But when i executes my query it shows me error 150 Error Code : 1005 Can't create table '.\vts#sql-6ec_1.frm' (errno: 150) (0 ms taken) My Queries are Query to create a foreign Key alter table `vts`.`tblguardian` add constraint `FK_tblguardian` FOREIGN KEY (`GuardianPickPointId`) REFERENCES `tblpickpoint` (`PickPointId`) Primary Key table CREATE TABLE `tblpickpoint` ( `PickPointId` int(4) NOT NULL auto_increment, `PickPointName` varchar(500) default NULL, `PickPointLabel` varchar(500) default NULL, `PickPointLatLong` varchar(100) NOT NULL, PRIMARY KEY (`PickPointId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC Foreign Key Table CREATE TABLE `tblguardian` ( `GuardianId` int(4) NOT NULL auto_increment, `GuardianName` varchar(500) default NULL, `GuardianAddress` varchar(500) default NULL, `GuardianMobilePrimary` varchar(15) NOT NULL, `GuardianMobileSecondary` varchar(15) default NULL, `GuardianPickPointId` varchar(100) default NULL, PRIMARY KEY (`GuardianId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1

    Read the article

  • Can MYSQL filter by date if date is stored as text? ex "02/10/1984"

    - by Roeland
    Hello! I am trying to modify an app for a client which has already a database of over 1000 items. The dates are stored as text in the database with the format "02/10/1984". The system allows you to add and remove fields to the catalog dynamically and it also allows the advanced search to have specific fields be allowed. The problem is that it wasn't designed with dates in mind, so when I set a field as a date, and try to search by a range the query is trying to do a AND (cfv0.value = 01/02/2004 AND cfv0.value <= 05/03/2008) . I can make it so the date range passed is a numeric time value. Is there a way that when sending the query, it takes the text fields (with the date) and converts it to numeric time value so at that point I am basically just comparing numbers which would work fine. I do not have the option to change all the current date to numeric value due to the way the dynamic fields are set up. Thanks guys!

    Read the article

  • Order hybrid mixed mysql search result in one query?

    - by Fredrik
    This problem is easy fixed clientside. But for performance I want to do it directly to the database. LIST a +------+-------+-------+ | name | score | cre | +------+-------+-------+ | Abe | 3 | 1 | | Zoe | 5 | 2 | | Mye | 1 | 3 | | Joe | 3 | 4 | Want to retrieve a joined hybrid result without duplications. Zoe (1st higest score) Joe (1st last submitted) Abe (2nd highest score) Mye (2nd last submitted) ... Clientside i take each search by itself and step though them. but on 100.000+ its getting awkward. To be able to use the LIMIT function would ease things up a lot! SELECT name FROM a ORDER BY score DESC, cre DESC; SELECT name FROM a ORDER BY cre DESC, score DESC;

    Read the article

  • Remote MySQL connection fails (10060)

    - by Stefan Åstrand
    When I am trying to connect to a MySQL database from a remote computer I get a prompt saying: Connection Failed: [HY000] [MySQL][ODBC 5.1 Driver]Can't Connect to MySQL server on 'XXX.XXX.XX.XX' (10060) I have created a user account in the MySQL Administrator and added a host to enable remote access, I have also made an exception for my Windows Firewall on port 3306 but the connection still fails. What is the problem? Thanks!

    Read the article

  • I am not able to drop foreign key in mysql Error 150. Please help

    - by Shantanu Gupta
    i am trying to create a foreign key in my table. But when i executes my query it shows me error 150 Error Code : 1005 Can't create table '.\vts#sql-6ec_1.frm' (errno: 150) (0 ms taken) My Queries are Query to create a foreign Key alter table `vts`.`tblguardian` add constraint `FK_tblguardian` FOREIGN KEY (`GuardianPickPointId`) REFERENCES `tblpickpoint` (`PickPointId`) EDIT: Now I am trying to drop this constraint But it fails again and shows me same error as it was giving when i was trying to create foreign key. alter table `vts`.`tblguardian` drop index `FK_tblguardian` Primary Key table CREATE TABLE `tblpickpoint` ( `PickPointId` int(4) NOT NULL auto_increment, `PickPointName` varchar(500) default NULL, `PickPointLabel` varchar(500) default NULL, `PickPointLatLong` varchar(100) NOT NULL, PRIMARY KEY (`PickPointId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC Foreign Key Table CREATE TABLE `tblguardian` ( `GuardianId` int(4) NOT NULL auto_increment, `GuardianName` varchar(500) default NULL, `GuardianAddress` varchar(500) default NULL, `GuardianMobilePrimary` varchar(15) NOT NULL, `GuardianMobileSecondary` varchar(15) default NULL, `GuardianPickPointId` int(4) default NULL, PRIMARY KEY (`GuardianId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1

    Read the article

  • Installing multiple MySQL .NET Connectors

    - by LookitsPuck
    Hi all, I currently have MySQL .NET Connector version 6.2.3 installed. I'd like to try out Database Manager from within IIS7, however, the dependency is on MySQL .NET Connector 5.2. When running the MySQL .NET Connector 5.2 installer, it says there's already an existing MySQL .NET Connector installed, and that this version can not be installed unless the other is uninstalled. Is there anyway to have both of these instances installed? Thanks! -Steve

    Read the article

  • How to give default values for the sum, count if no data exist in mysql query which uses group by?

    - by Salil
    I am using following query which works fine for me except one problem SELECT f.period as month, sum(p.revenue * ((100-q.rate)/100)) as revenue ,count(distinct q.label) as tot_stmt FROM files f, reports p, rates q,albums a where f.period in ('2010-06-01','2010-05-01','2010-04-01','2010-03-01') and f.period_closed = true and q.period = f.period and a.id = q.album_id and p.file_id = f.id and p.upc = a.upc and p.revenue is not null GROUP BY month ORDER BY month DESC O/P = month            revenue     tot_stmt 2010-06-01     10.00         2 2010-05-01     340.47       2 I want result like following month            revenue     tot_stmt 2010-06-01     10.00         2 2010-05-01     340.47       2 2010-04-01     0.00           0 2010-03-01     0.00           0 Regards, Salil Gaikwad

    Read the article

  • Should I use two queries, or is there a way to JOIN this in MySQL/PHP?

    - by Jack W-H
    Morning y'all! Basically, I'm using a table to store my main data - called 'Code' - a table called 'Tags' to store the tags for each code entry, and a table called 'code_tags' to intersect it. There's also a table called 'users' which stores information about the users who submitted each bit of code. On my homepage, I want 5 results returned from the database. Each returned result needs to list the code's title, summary, and then fetch the author's firstname based on the ID of the person who submitted it. I've managed to achieve this much so far (woot!). My problem lies when I try to collect all the tags as well. At the moment this is a pretty big query and it's scaring me a little. Here's my problematic query: SELECT code.*, code_tags.*, tags.*, users.firstname AS authorname, users.id AS authorid FROM code, code_tags, tags, users WHERE users.id = code.author AND code_tags.code_id = code.id AND tags.id = code_tags.tag_id ORDER BY date DESC LIMIT 0, 5 What it returns is correct looking data, but several repeated rows for each tag. So for example if a Code entry has 3 tags, it will return an identical row 3 times - except in each of the three returned rows, the tag changes. Does that make sense? How would I go about changing this? Thanks! Jack

    Read the article

  • Crate datasource for mysql to different machine in glassfish

    - by Dickson
    I'm using glassfish(v2.11) as my application server and I have another machine for mysql database server. Currently I want to separate the app server and db server, so I create a jdbc datasource to point to mysql server, but it doesn't works as expect, by the way, when I create datasource to point to local machine (glassfish app server and mysql db server in single machine), and It works well. Is there any configuration I need to care of when pointing datasource to different machine which I use to host my database (MySQL 5.1)?

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >