Search Results

Search found 14874 results on 595 pages for 'mysql connector'.

Page 100/595 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • How to SET tiggers 0 in MySQL?

    - by Grijesh Chauhan
    In my MySQL database I have some Triggers ON DELETE and ON INSERT. Some time I need to switched-off my some Triggers, And I have to DROP e.g. DROP TRIGGER IF EXISTS hostgroup_before_insert // and reinstall. Is there any shortcut to SET triggers hostgroup_before_insert = 0 like we have for foreign keys mysql> SELECT version(); +-------------------------+ | version() | +-------------------------+ | 5.1.61-0ubuntu0.10.10.1 | +-------------------------+ 1 row in set (0.00 sec) I am new learner and I could not find regarding this on web.

    Read the article

  • How to strore Java Date to Mysql datetime...?

    - by user275843
    can any body tell me how can i store Java Date to Mysql datetime...? when i am trying to do so...only date is stored and time remain 00:00:00 in mysql date stores like this... 2009-09-22 00:00:00 i want not only date but also time...like 2009-09-22 08:08:11 please help me.... EDIT---- i am using JPA(Hibernate) with spring mydomain classes uses java.util.Date but i have created tables using handwritten queries... this is my create statement CREATE TABLE ContactUs (id BIGINT auto_increment, userName VARCHAR(30), email VARCHAR(50), subject VARCHAR(100), message VARCHAR(1024), messageType VARCHAR(15), contactUsTime datetime, primary key(id))TYPE=InnoDB;

    Read the article

  • [MySQL, InnoDb] Rating place

    - by Pavel
    I'm trying to generate rating place table using following receipt http://stackoverflow.com/questions/1776821/assign-places-in-the-rating-mysql-php but my database is high loaded. I tried not to create table, but use MEMORY TABLE and update it using following SQL query insert into tops (uid) select uid from users order by exp desc; but got the following MySQL error Deadlock found when trying to get lock; try restarting transaction because there are too many queries until SQL select is being executed. How to solve this problem? P.S. CREATE TABLE tops as SELECT work almost fine except high server load... up to load average: 50 if tops are non-memory table. My table users has near 4.5 millions of rows. Thanks for any advices.

    Read the article

  • Using the MySql ASP.NET membership provider with existing users

    - by ScottBelchak
    I have been tasked with migrating an existing mature ASP.NET 2.0 web site to NHibernate, Mono and MySQL or postgres. I am somewhat confused as how the membership provider salts the passwords. If I make the switch and use the MySQL membership provider (outlined in this question) or AspSqlProvider, will the existing users be able to login? I guess it would be easier for me to ask: How the hell do I get access to the encryption key used by the ASP.NET membership provider that salts the passwords so that I can use the same one in a third party provider?

    Read the article

  • Advantages of SQLServer vs. MySQL for C#/.NET4 Cloud Applications

    - by Ed Eichman
    I am considering building several C#/.NET4 applications all using a central, cloud based database. In addition, several LAMP (MySQL) web shops will be accessing the cloud DB. MySQL is the database that I'm most familiar with, and my default selection for the cloud DB would be MySQL on Amazon or Joyent. However, I was wondering what development "extras" are available for SQLServer in VisualStudio 2010 that are not available for MySQL. Are there any "killer features" that should make me consider SQLServer instead of MySQL?

    Read the article

  • PHP: Simulate multiple MySQL connections to same database

    - by Varun
    An insert query is constantly getting logged in my MySQL slow query log. I want to see how much time the INSERT query is taking with 100 simultaneous insert operations(to the same table). So I need to simulate the follwoing. 500 different simultaneous connections from PHP to the same database on a mysql server, all of which are inserting a row(simultaneously) to the same table. DO I need to use any load testing tool? Or Can I simply write a PHP script to do this? Any thoughts?

    Read the article

  • MySQL how to display data from two tables.

    - by gew
    I'm trying to display the username of the person who has submitted the most articles but I don't know how to do it using MySQL & PHP, can someone help me? Here is the MySQL code. CREATE TABLE users ( user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, username VARCHAR(255) DEFAULT NULL, pass CHAR(40) NOT NULL, PRIMARY KEY (user_id) ); CREATE TABLE users_articles ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, user_id INT UNSIGNED mNOT NULL, title TEXT NOT NULL, acontent LONGTEXT NOT NULL, PRIMARY KEY (id) ); Here is the code I have so far. $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT COUNT(*) as coun, user_id FROM users_articles GROUP BY user_id ORDER BY coun DESC LIMIT 1");

    Read the article

  • overlay items from mysql

    - by user1285471
    I have several locations in tables in a mysql database which i want to have displayed as POI's, the table is too large and changes too frequently to use sql lite so i need to get the info from mysql. I have set up a mapView indicating the device location in mapview using an image at drawable, but i now need to ad the other locations from the database. Then when a user clicks on an item i need a popup with options to route there using google maps navigation, or view mobi site, phone, or email. I am new to android. Please assist. Have gone through the overlay tut but no indication on how to get the info from db. Is there a tut somwhere so i can see some example code to do this?

    Read the article

  • Secure way to backup MySQL databases?

    - by user203538
    What is the best/secure way to backup a mysql database on windows server (2008)? I have "MySQL Administrator" but that requires that you save passwords for backup project. I'm not keen on doing as anyone gaining access to the server would then have easy access to the database. Can you do anything similar to SQL Server like using Windows authentication. If not what is the most secure (and practical) way of backups. Lastly, what are the privileges needed to backup a database? I have created a single user just for this task. Please advise.

    Read the article

  • PHP and MySQL SELECT problem.

    - by R.I.P.coalMINERS
    Trying to check if a name is already stored in the database from the login user. The name is a set of dynamic arrays entered by the user threw a set of dynamic form fields added by the user. Can some show me how to check and see if the name is already entered by the login user? I know my code can't be right. Thanks! MySQL code. SELECT * FROM names WHERE name = '" . $_POST['name'] . "' AND userID = '$userID' Here is the MySQL table. CREATE TABLE names ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, userID INT NOT NULL, name VARCHAR(255) NOT NULL, meaning VARCHAR(255) NOT NULL, PRIMARY KEY (id) );

    Read the article

  • Problem using mysql joins

    - by mariomario
    I'm fairly new to mysql and I have no idea if I'm heading in the right direction but I'm having trouble with a mysql query. I basically have a table of users id name ---- -------- 1 user1 2 user2 3 user3 4 user4 as well as a table of user attributes id userid attribute ---- ----- ------ 1 1 5 2 1 6 3 2 5 4 3 4 I want to be able to select users that have both the attribute 5 and the attribute 6, so in this case I want to return id name ---- -------- 1 user1 I tried using a join like this. SELECT u.id, u.name FROM users u LEFT JOIN attributes a ON (a.userid = u.id) WHERE a.attribute = 5 AND a.attribute = 6 But obviously that won't work, what is the best way of doing this?

    Read the article

  • MySQL indexes - what are the best practises?

    - by Haroldo
    I've been using indexes on my mysql databases for a while now but never properly learnt about them. Generally I put an index on any fields that i will be searching or selecting using a WHERE clause but sometimes it doesn't seem so black and white. What are the best practises for mysql indexes? example situations/dilemas: If a table has six columns and all of them are searchable, should i index all of them or none of them? . What are the negetive performance impacts of indexing? . If i have a VARCHAR 2500 column which is searchable from parts of my site, should i index it?

    Read the article

  • PHP+MYSQL Server Config

    - by Matias
    Hi guys, I am parsing an XML file with PHP and inserting the rows in a MYSQL database. I am using PHP simplexml_load_files to load the XML and a foreach to loop through the array and insert the rows into my database. It works perfectly fine with small files i am testing, but it comes to reality I need to parse a large 500mb XML file and nothing happens. I was wondering what was the right Php.ini config for this case ? I have a VPS Linux Cent OS, with 256 mb of dedicated Memory and MYSQL 5.0.5. I have also set php memory_limit = 256M (maximum of my server) Any suggestions, similar experiences will be greatly appreciated Thanks

    Read the article

  • Help getting the following create table function to work with mysql and C#

    - by Matt
    string createTable = "CREATE TABLE IF NOT EXISTS " + m_strDatabase + "_TimeLogs (logName VARCHAR(16), logTime INTEGER, logCountry TEXT, UNIQUE(logName)) TYPE=MyISAM;"; When this runs, no table is created. No errors either. Im using an ODBC connector. the variable passes in the db name, so that the table created would be users_TimeLogs if the database was called users for example. Am I doing something wrong?

    Read the article

  • Find mininum unused value in mysql table

    - by splattru
    I have a MySQL table like this: +--------+-------+ + Server + Port + +--------+-------+ + 1 + 27001 + +--------+-------+ + 2 + 27002 + +--------+-------+ + 4 + 27004 + +--------+-------+ How you can see - here was 27003 port - but it was deleted some time ago (just for example). Is there some way to know the minimum value that is not used (higher than 27000 for example) in mysql table? Or there is no way and I need to make an separate table with all ports and column with "used" or "not used" ? Situation explanation: I am creating game hosting website, and I can use auto-increment for ports, but I will have a lot of deleted/unused ports after some time, and I want to use all of them before increasing port range. Thanks for your answers!

    Read the article

  • insert ... select with divide operator in select errors?

    - by Mark
    Hi, the following query CREATE TABLE IF NOT EXISTS XY ( x INT NOT NULL , y FLOAT NULL , PRIMARY KEY(x) ) INSERT INTO XY (x,y) (select 1 as x ,(1/7) as y); errors with Error code 1064, SQL state 42000: 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 'INSERT INTO XY (x,y) (select 1 as x ,(1/7) as y)' at line 7 Line 1, column 1 any ideas?

    Read the article

  • Default datetime format in mySQL

    - by Davuz
    I'm coding to search data by compare datetime. In web form, user input value '2012-06-04' store in $_REQUEST['dateSearch']. I create datetime object from that: $dateObj = date_create_from_format("Y-m-d",$_REQUEST['dateSearch']); $dateParam = $dateObj->format("Y-m"); Then I use $dateParam in sql query to find data $sql = " SELECT * FROM `temp` as `t` WHERE `t`.`date` LIKE '$dateParam%' "; Everything is ok, but I'm not sure mySQL alway use only one datetime format "Y-m-d H:i:s". At here, $dateParam = $dateObj->format("Y-m"); I set default format is "Y-m". Is the default format never change? I don't want hard set format "Y-m-d H:i:s" in code, instead of, I think get format string from system to use is better. How do I get default datetime format string from mySQL???

    Read the article

  • MySQL Update Trigger with Conditions

    - by user1760656
    I have a PHP app that inserts 'Pass', 'Fail' or 'NA' into fields TEST1, TEST2, TEST3... through TEST15. I have a field called OVERALL that needs to be automatically updated with 'FAIL' if any of the TEST1-TEST15 fields contains 'Fail'. I'm pretty sure I need to use a trigger containing the update statement and either CASE or IF, but I haven't been able to nail down the exact syntax. Can anyone please help a MySQL noob? I'm using MySQL Server version: 5.1.63-0+squeeze1 (Debian).

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >