Search Results

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

Page 94/1445 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • Indexing datetime in MySQL

    - by User1
    What is the best way to index a datetime in MySQL? Which method is faster: Store the datetime as a double (via unix timestamp) Store the datetime as a datetime The application generating the timestamp data can output either format. Unfortunately, datetime will be a key for this particular data structure so speed will matter. Also, is it possible to make an index on an expression? For example, index on UNIX_TIMESTAMP(mydate) where mydate is a field in a table and UNIX_TIMESTAMP is a mysql function. I know that Postgres can do it. I'm thinking there must be a way in mysql as well.

    Read the article

  • Php getting too many connections error from MySQL

    - by uzioriluzan
    Hello everyone, I am using MySQL and PHP with 2 application servers and 1 database server. With the increase of the number of users (around 1000 by now), I'm getting the following error : SQLSTATE[08004] [1040] Too many connections The parameter "max_connections" is set to "1000" in my.cnf and "mysql.max_persistent" is set to -1 in php.ini. There are at most 1500 apache processes running at a time since the "MaxClients" apache parameter is equal to 750 and we have 2 application servers. Should I raise the "max_connections" to 1500 as indicated in here? Or should I set "mysql.max_persistent" to 750 (we use PDO with persistent connections for performance reasons since the database server is not the same as the application servers)? Or should I try something else? Thanks in advance!

    Read the article

  • Extend MySQL implementation of PiP Algorithm?

    - by Mike
    I need to make a point in polygon MySQL query. I already found these two great solutions: http://forums.mysql.com/read.php?23,286574,286574 MySQL implementation of ray-casting Algorithm? But these functions can only check if one point is inside a poly. I have a query where the PiP part should only be one part of the query and check for x points inside a polygon. Something like this: $points = list/array/whatever of points in language of favour SELECT d.name FROM data AS d WHERE d.name LIKE %red% // just bla bla // how to do this ? AND $points INSIDE d.polygon AND myWithin( $points, d.polygo ) // or UPDATE I tried it with MBR functions like this: SET @g1 = GeomFromText('Polygon((13.43971 52.55757,13.41293 52.49825,13.53378 52.49574, 13.43971 52.55757))'); SET @g2 = GeomFromText('Point(13.497834 52.540489)'); SELECT MBRContains(@g1,@g2); G2 should NOT be inside G1 but MBR says it is.

    Read the article

  • Update Web Reference in Visual Studio

    - by NeilD
    Hi, I have inherited a web site project that makes use of a number of WCF Web Services hosted on a BizTalk server. We have two environments that I need to deploy this project to, with different URLs for the different BizTalk servers. i.e. In the Staging environment, I need to point the services at xx.xx.xx.101 In the Live environment, I need to point them at xx.xx.xx.102, or whatever. Currently, we've got all of the URLs stored in keys in the web.config file, so that we can change them dynamically... Unfortunately this isn't working! If I change the URL in the web.config to something other than what the project was compiled with, I get an error when calling the service: Server did not recognize the value of HTTP Header SOAPAction: xx.xx.xx.101\ServiceName\MethodName I'm told that the only way they've known to deploy this is to update the web.config URLs, change all of the web references in Visual Studio to match, click on "update web reference" for each reference in Visual Studio, and then compile. It's driving me mad! I've written a pre-build NAnt script to go through and replace all instances of the URL found anywhere in the project directory, and even that isn't making any difference. There must be something else being pulled down from the service when I click the "update reference", but I'm new to working with web services, and so I'm not sure what. Does anyone have any ideas? Is there a way to do this programatically? Thanks.

    Read the article

  • Best way to handle MySQL date for performance with thousands of users

    - by bitLost
    I am currently part of a team designing a site that will potentially have thousands of users who will be doing a number of date related searches. During the design phase we have been trying to determine which makes more sense for performance optimization. Should we store the datetime field as a mysql datetime. Or should be break it up into a number of fields (year, month, day, hour, minute, ...) The question is with a large data set and a potentially large set of users, would we gain performance wise breaking the datetime into multiple fields and saving on relying on mysql date functions? Or is mysql already optimized for this?

    Read the article

  • Will MySql caching cause performance problems?

    - by Camran
    I am about to upload my website onto a VPS. It is a classifieds website, where all data is stored in MySql and Solr. I wonder if when using MySql:s cache, the server will slow down? Ie, if somebody makes a search for the first time, and MySql is to cache the query, will the caching make the server slower than if it would not cache anything? After the caching is done I know things will improve in terms of performance... But I would like to know if I should even use the cache or not, what do you think? Thanks

    Read the article

  • MYSQL - REMOVE HTML TAGS from Record

    - by Dam
    Need help to form the MYSQL query from table one column having the bellow content Row1 : this is first <a href='mytext.txt'>row</a> from the table Row 2 : THis is the second row <img src ='mytext.jpg'> my image is there Row 3 : <p>This is the Third row my mytext is there </p> Row 4 : <p class='te_mytext'>This is the Third row my text is there </p> this is the table rows i try to search the keyword as 'mytext' my query is SELECT * from table WHERE colmn_name ` like '%mytext%' " i will get all the 4 rows as result but the result is wrong ..... need to get the correct output as only Row 3 the reason this row only having the mytext inside the content all other are not in content but mytext having in all rows how can i write the Query MYSQL please help me (NOT in PHP only MYSQL )

    Read the article

  • How to pass or display mySQL data based on subscription or billing

    - by spm
    I want to build a PHP based site where, the user can view data based on the types of data they've paid for. Allow me to use something simple for an example. Let's say historical data for basketball was not readily available but could be purchased. Simple information such as the Winner, Loser, Final score and date are all stored in a mySQL table. What would be involved so that, when the user logs in, they can only see the historical data they have paid for. My theories so far about the architecture: I imagined a mySQL table storing True or False values for all historical game data they have paid for. Based on this, a 'data chart' object enables the user to view all data within their mySQL row which has a value of 'true.' Follow ups: Assuming I am correct, what methods are popular or practical for this type of service.

    Read the article

  • Subversion update misses new directories

    - by Mike Q
    Hi all, Periodically we have trouble with SVN when doing updates. Very occasionally when someone adds a new directory doing an update through Tortoise doesn't work. If we do a "Fully Recursive" update using "Update from revision..." option then it picks it up fine. I'm poked around and seen this question which is virtually identical but with no answer. I've found the item on the SVN website, referenced by that post, that talks about an issue in 1.6.0 which is now fixed. However my SVN version is 1.6.9 and Tortoise is 1.6.7 so I wouldn't expect to have this problem any more. This only seems to occur with new directories, never seen it for individual files. We may have had older versions of Tortoise at one point (can't remember which tho) so maybe some issue has been introduced into our repo that an upgrade doesn't solve. We have the workaround but it wastes a few minutes of head-scratching after failed builds to figure it out and people who haven't come across this problem before really struggle until they ask someone else. Anyone know if this is a known bug and any permanent solutions? Thanks.

    Read the article

  • Phantom activity on MySQL

    - by LoveMeSomeCode
    This is probably just my total lack of MySQL expertise, but is it typical to see lots of phantom activity on a MySQL instance via phpMyAdmin? I have a shared hosting plan through Lithium, and when I log in through the phpMyAdmin console and click on the 'Status' tab, it's showing crazy high numbers for queries. Within an hour of activating my account I had 1 million queries. At first I thought this was them setting things up, but the number is climbing constantly, averaging 170/second. I've got a support ticket in with Lithium, but I thought I'd ask here if this were a MySQL/shared host thing, because I had the same thing happen with a shared hosting plan through Joyent.

    Read the article

  • Navigating by foreign keys in ADO.NET Entity Framework/MySQL

    - by Werg38
    I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I am using the MySQL ADO.NET connector 6.2.3 to provide the connection for the ADO.NET Entity Data Model. This is mostly working ok, however navigating via foreign keys is causing me a real headache! Here is a simplified example.. Car (Table) CarID PK Colour Doors ManufacturerID FK Manufacturer (Table) ManufacturerID PK Name In the edmx file I can see the 1-many relationship shown as a navigation property in the both the Car and Manufacturer tables. I create a Models.CarRepository that allows me to returns a IQueryable. At the View I want to be able to display the Manufacturer.Name for each car. This is not accessible via the object I get returned. What is best way to implement this? Have I encountered a limitation of the Entity Framework/MySQL combination?

    Read the article

  • Do MySQL Locked Tables affect related Views?

    - by CogitoErgoSum
    So after reading http://stackoverflow.com/questions/1415602/performance-in-pdo-php-mysql-transaction-versus-direct-execution in regards to performance issues I was thinking about I did some research on locking tables in MySQL. On http://dev.mysql.com/doc/refman/5.0/en/table-locking.html Table locking enables many sessions to read from a table at the same time, but if a session wants to write to a table, it must first get exclusive access. During the update, all other sessions that want to access this particular table must wait until the update is done. This part struck me particularly becuase most of our queries will be updates rather than inserts. I was wondering if one created a table called foo on which all updates/inserts were carried out and then a view called foo_view (A copy of foo, or perhaps foo and a linkage of several other tables plus foo) on which all selects occured, would this locking issue still occur? That is, would SELECT quries on foo_view still have to wait for an update to finish on foo?

    Read the article

  • MySQL function return more than 1 row

    - by bobobobo
    I'd like to write a MySQL stored function that returns multiple rows of data. Is this possible? It seems to be locked at 1 row -- can't even return 0 rows. For example DELIMITER // create function go() RETURNS int deterministic NO SQL BEGIN return null ; -- this doesn't return 0 rows! it returns 1 row -- return 0 ; END // DELIMITER ; Returning null from a MySQL stored proc though, doesn't return 0 rows.. it returns 1 row with the value null in it. Can I return 0, or more than 1 row from a MySQL function, how?

    Read the article

  • Mysql search design

    - by neil
    I'm designing a mysql database, and i'd like some input on an efficient way to store blog/article data for searching. Right now, I've made a separate column that stores the content to be searched - no duplicate words, no words shorter than four letters, and no words that are too common. So, essentially, it's a list of keywords from the original article. Also searched would be a list of tags, and the title field. I'm not quite sure how mysql indexes fulltext columns, so would storing the data like that be ineffective, or redundant somehow? A lot of the articles are on the same topic, so would the score be hurt by so many of the rows having similar keywords? Also, for this project, solutions like sphinx, lucene or google custom seach can't be used -- only php & mysql. Thanks!

    Read the article

  • MySQL, delete and index hint

    - by Manuel Darveau
    I have to delete about 10K rows from a table that has more than 100 million rows based on some criteria. When I execute the query, it takes about 5 minutes. I ran an explain plan (the delete query converted to select * since MySQL does not support explain delete) and found that MySQL uses the wrong index. My question is: is there any way to tell MySQL which index to use during delete? If not, what ca I do? Select to temp table then delete from temp table? Thank you!

    Read the article

  • How to know my username and password in mysql console

    - by msheshtawy
    i've installed mySQL .. i entered my password , but i can't remember they've asked me for a username .. is it admin or root ? i wanna add the username and password to RubyonRails database.yml i remember i found a command that tells me the username and password in the mysql console .. but can't find it again ! that's the part i wanna add in my database.yml development: adapter: mysql database: myprojectname_development username: unknown password: devrailspassword host: localhost Since i just started development i don't have a database yet, so there is no way of trial and error ( not that i know of )

    Read the article

  • Cannot connect to MySQL 4.1+ using old authentication

    - by B T
    I'm trying to connect to a mySQL database at http://bluesql.net, but when I try to connect, it gives this error: Connect Error (2000) mysqlnd cannot connect to MySQL 4.1+ using old authentication I've looked into this, and it has to do with some old password scheme used before MySQL 4.1. Newer versions have the option to use old passwords, which I've read may cause this problem. I'm running php 5.3, and connecting with mySQLi (new mysqli(...)). I'm hoping I can do something in the code to connect to the DB at bluesql.net - clearly I don't control how their database is set up. Downgrading php versions isn't an option. Anyone have any ideas?

    Read the article

  • MySQL Returns wrong values on SELECT statement

    - by Andrew K
    All, I'm wondering if this is a MySQL bug, but since I've seen others playing with larger numbers than this, I'm thinking I'm doing something wrong here. Here is my table structure for the table I'm querying: mysql describe ipspace6\G ************* 1. row ************* Field: id Type: decimal(39,0) unsigned Null: NO Key: Default: NULL Extra: ************* 2. row ************* Field: addr Type: decimal(39,0) unsigned Null: NO Key: PRI Default: 0 Extra: ************* 3. row ************* Field: netmask Type: decimal(39,0) unsigned Null: NO Key: Default: 0 Extra: ************* 4. row ************* Field: subnet Type: int(4) Null: NO Key: Default: NULL Extra: Now, I run a simple SELECT statement against the "id" column: mysql SELECT id FROM ipspace6 WHERE id='50552019118453823914642686339427860480'; +----------------------------------------+ | id | +----------------------------------------+ | 50552019118453823730175245602332344320 | | 50552019118453823730175245602332344320 | | 50552019118453823914642686339427860480 | | 50552019118453823914642686339427860480 | +----------------------------------------+ ...What the heck is going on here? Two of these results are valid, and two definitely are not. It's not like I'm doing some super-complex nested query or anything, this is simple stuff, and it's driving me insane. Help, anyone?

    Read the article

  • What would be my best MySQL Synchronization method?

    - by Kerry
    We're moving a social media service to be on separate data centers with global load balancing, as our other hosting provider's entire data center went down. Twice. This means that both websites need to be synchronized in some sense -- I'm less worried about the code of the pages, that's easy enough to sync, but they need to have the same database data. From my research on SO, it seems MySQL Replication is a good option, but the MySQL manual, for scaling out, says that its best when there are far more reads then there are writes/updates: http://dev.mysql.com/doc/refman/5.0/en/replication-solutions-scaleout.html In our case, it's about equal. We're getting around 200-300 thousand requests a day right now, and we can grow rapidly. Every request is both a read and write request. What would be the best method or tool to handle this?

    Read the article

  • MySQL does not work on localhost without Local Area Connection

    - by user985171
    I use WampServer(Apache, PHP, MySQL) and have no problems when some kind of network adapter(wireless or lan) is connected(i-e Local Area Connection has status connected) 'even if i am not connected to the internet'(for example when i am connected to the router but that is not connected to the internet). When there is no network connection, i get a php error like MySQL could not connect to 127.0.0.1 on port 3306. Interestingly, 'telnet 127.0.0.1 3306' says that it could not connect to the port, even when the server and MySQL are running fine(i-e when some kind of local area connection is connected). So i turned off all kinds of firewall(antivirus and windows) but still no difference in anything. And that is why this issue is quite puzzling. Things i have already tried(will update this list along the way):- -The skip-networking directive in my.ini.

    Read the article

  • Beginner's Question about accessing mysql using OOP

    - by user345690
    I am reading the PHP and mySQL web development book and so far been doing all the PHP and mysql using procedural. But then it talks about accessing mysql with objects. This works for me: //I define $db so can connect $query="select * FROM testing"; $result=mysqli_query($db,$query); while($row=mysqli_fetch_array($result)){ //echo the data } But when I try to do it with classes, it doesn't $query="select * FROM testing"; $result=$db->query($query); $row=$result->fetch_assoc(); Do I have to write my own class so it defines what query and fetch_assoc does? Or what?

    Read the article

  • Format MySQL code inside PHP string

    - by JohnA
    Is there any program IDE or not that can format MySQL code inside PHP string e.g. I use PHPStorm IDE and it cannot do it. It does that for PHP and MYSQL but not for MYSQL inside php string. I am ready to use new IDE because now i have to manually format hundreds of database requests that are one line and not readable. Only criteria for my choice is that ide can do that automatically. <?php ... $request1 = "select * from tbl_admin where admin_id= {$_SESSION['admin_id']} and active= 1 order By admin_id Asc"; ... ?> should become <?php ... $request1 = "SELECT * FROM tbl_admin WHERE admin_id = {$_SESSION['admin_id']} AND active = 1 ORDER BY admin_id ASC"; ... ?>

    Read the article

  • MySQL transaction conundrum

    - by David Faitelson
    I need to perform several inserts in a single atomic transaction. For example: start transaction; insert ... insert ... commit; However when MySQL encounters an error it aborts only the particular statement that caused the error. For example, if there is an error in the second insert statement the commit will still take place and the first insert statement will be recorded. Thus, when errors occur a MySQL transaction is not really a transaction. To overcome this problem I have used an error exit handler where I rollback the transaction. Now the transaction is silently aborted but I don't know what was the problem. So here is the conundrum for you: How can I both make MySQL abort a transaction when it encounters an error, and pass the error code on to the caller?

    Read the article

  • Read a large result set in chunks from mysql

    - by ripper234
    I am trying to read a huge result set from mysql. Reading them in a straight-forward manner didn't work, as mysql tries to return all results together, which times out. I found the following piece of code which tells mysql to read the results back one at a time: stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY); stmt.setFetchSize(Integer.MIN_VALUE); Can I read a chunk at a time instead of one by one? I've tried setting fetch size to a different value, but it doesn't work.

    Read the article

  • Encrypting MySQL Traffic In Scripts

    - by threepoints
    Hello, I need to be able to encrypt the MySQL traffic from a web server to a database server. I know how to set MySQL to use SSL based on the server and client settings in my.cnf however, this needs to be done using mysql_connect() in PHP. This may be a 2 part question. 1) Does mysql_connect() use the MySQL client settings that are set in my.cnf? If not... I have read that you can use MYSQL_CLIENT_SSL however, where is the SSL data obtained from? Does using MYSQL_CLIENT_SSL in the mysql_connect function automagically encrypt the traffic? Simply put, what is the best way to do this? Thanks!

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >