Search Results

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

Page 104/1445 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • polymorphism alternative for MySQL stored procedures

    - by zombiegx
    I'm porting some stored procedures from Informix to MySQL, but I have two stored procedures on Informix that have same name and different parameters. In MySQL, I can't create two SP with the same name, and also can't create a SP with default values in parameters. so, do someone out there know any hackery or black magic that may help me solve this problem? thanks.

    Read the article

  • mysql query to select the bottom values from a table

    - by S.PRATHIBA
    Hi all, I have the following table. mysql> select * from consumer2; SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK 31 PRINTER 1 32 PRINTER -1 33 PRINTER 0 34 PRINTER -1 35 PRINTER 0 31 PRINTER 0 32 PRINTER 1 35 PRINTER 1 31 PRINTER 0 From the above table i need to select the bottom 4 values using mysql i need to get the output as follows SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK 31 PRINTER 0 32 PRINTER 1 35 PRINTER 1 31 PRINTER 0 Please help me.Thank u in advance.

    Read the article

  • MySQL Data Truncation: Out of range value in Performance test

    - by Khaledez
    on a test for Java-MySQL-Restlet application, I write to database at 4reqs/second for 120 seconds. In this write I insert a row that has foreign key which has the same value for all rows, and this exception occurs: Could not recover transaction. Original exception follows. com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'idPxxx' at row 1 Only 5% of requests fails to this exceptions, others works. Regards

    Read the article

  • Moving Binary logs in Mysql to a different harddisk

    - by Darini
    This question is about Mysql Binary logging.We need to move the Binary logging to a different hard disk . What is the configuration change required in Mysql?.Currently Binary logs go into the same folder as the ibdata and there is a replication slave running which needs the binary logs

    Read the article

  • MySQL: How to check if a string is a valid DATE, TIME or DATETIME

    - by Svish
    When I try to put a value into a DATE field which is invalid, MySQL seems to use 0000-00-00 instead. Is there a way I can do this "check" without updating a DATE field? And to do it from for example PHP? Like, is there a way I can query the MySQL server and ask "Hey, is this DATE, TIME or DATETIME valid to you?" Or is there maybe an even better way of doing it?

    Read the article

  • On Update: Auto Update Date/Time Field

    - by Abs
    Hello all, Is there an equivalent of MySQLs on update field for SQL server? With both DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP clauses, the column has the current timestamp for its default value, and is automatically updated. What I am looking for is to have a date/time field and every time I update a record it updates the field with the date/time it was updated automatically? If it doesn't exist, I guess I'll have to go manual. Thanks all

    Read the article

  • mysql not in my PATH for some reason

    - by Dr.Dredel
    I've installed mysql on several macs and on one of them mysql is not in the path. If I export it it shows up in the path correctly, but upon reboot, disappears. What should I do to get the machine to keep it in the path and what are the machines that DO have it in their path doing differently? Any thoughts appreciated.

    Read the article

  • MySQL DATE_ADD usage, 5 day interval

    - by Webnet
    I'm trying to select the order total sum ($) and invoice count over a 5 day period in a single query. I can't seem to get this to happen though. The current query I have is here... SELECT COUNT(id) as invoice_count, SUM(orderTotal) as orders_sum, UNIX_TIMESTAMP(created) as created FROM ids_invoice WHERE DATE_ADD(created, INTERVAL +1 DAY) AND userId = '.$userId.$whereSql I'm not entirely sure DATE_ADD is the right function I'm looking for I'm fairly new to mysql date functions so perhaps I just missed the function I needed when going through mysql docs.

    Read the article

  • Mysql console slow on import of huge sql files

    - by Kennethvr
    My import of sql via the mysql console is rather slow and as our sql file is increasing every day I would like to know if there are any alternatives on how to import a sql file faster. Changing to oracle or other systems is no option, the configuration has to stay the same. Currently the sql file is: 1.5 Gb I'm on Wamp with Apache 2.2.14, PHP 5.2.11 and MySQL 5.1.41. Any suggestions?

    Read the article

  • Mysql dynamic query

    - by pradeep
    I have two table in mysql one tbl_a which has one int column id, second tbl_b which has one column song_ids in which data stored seapated by comma like 1,2,3,4 i want to select all id like this select * from tbl_a where id in (select song_id from tbl_b) but its giving me no record as its varchar HOW to do it in mysql

    Read the article

  • How to implement XXTEA in MySQL?

    - by user339229
    Anyone knows how to implement XXTEA in MySQL? For example - SELECT xxtea_encrypt('text here', 'key here'); possible implementation is by creating a FUNCTION in MySQL using CREATE FUNCTION statement, e.g. CREATE FUNCTION xxtea_encrypt XXTEA Procedures here... RETURN encrypted string Thanks & Best regards

    Read the article

  • MySql Driver not loaded

    - by ayla
    I use Visual Studio 2008, MySQL 5.0.90,Qt 4.6.3 and C++ I try connect MySql but it gives this error messages. Driver not loaded. I am new programmer. How cann I solve this problem? Thank a lot.

    Read the article

  • Modifying MySQL Where Statement Based on Array

    - by Ryan
    Using an array like this: $data = array ( 'host' => 1, 'country' => 'fr', ) I would like to create a MySQL query that uses the values of the array to form its WHERE clause like: SELECT * FROM table WHERE host = 1 and country = 'fr' How can I generate this query string to use with MySQL?

    Read the article

  • MySql TEXT column?

    - by acidzombie24
    I ran this using MySql and it appears to not like TEXT. With SQL server i use nvarchar(max) What should i use in MySQL? In other tables some fields will be descriptions and may be long so ATM i am thinking fixed length is bad. create table if not exists misc_info ( id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL, key TEXT UNIQUE NOT NULL, value TEXT NOT NULL)ENGINE=INNODB;

    Read the article

  • trigger problem in mySql database

    - by ognjenb
    I have this code (mySql 5.1.36) CREATE TRIGGER problem_description AFTER INSERT ON problem_description FOR EACH ROW BEGIN INSERT INTO log SET Id=NEW.Id,user_name=NEW.user_name; END; and have this error: #1064 - 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 '' at line 3

    Read the article

  • Importing old mysql data folder

    - by samgoody
    After a reinstall, all of the old data still shows inside the MySQL/data folder, but is not actually loaded into the database. Is there any way to have MySQL scan it's data folder and / or reimport the old folders it has from its previous install? [Some data was changed after the last backup / export - partially my fault - so I would rather it recognize the folders rather than reimporting the SQL files.]

    Read the article

  • Incorrect usage of UPDATE and ORDER BY

    - by nico55555
    I have written some code to update certain rows of a table with a decreasing sequence of numbers. To select the correct rows I have to JOIN two tables. The last row in the table needs to have a value of 0, the second last -1 and so on. To achieve this I use ORDER BY DESC. Unfortunately my code brings up the following error: Incorrect usage of UPDATE and ORDER BY My reading suggests that I can't use UPDATE, JOIN and ORDER BY together. I've read that maybe subqueries might help? I don't really have any idea how to change my code to do this. Perhaps someone could post a modified version that will work? while($row = mysql_fetch_array( $result )) { $products_id = $row['products_id']; $products_stock_attributes = $row['products_stock_attributes']; mysql_query("SET @i = 0"); $result2 = mysql_query("UPDATE orders_products op, orders ord SET op.stock_when_purchased = (@i:=(@i - op.products_quantity)) WHERE op.orders_id = ord.orders_id AND op.products_id = '$products_id' AND op.products_stock_attributes = '$products_stock_attributes' AND op.stock_when_purchased < 0 AND ord.orders_status = 2 ORDER BY orders_products_id DESC") or die(mysql_error()); }

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >