Search Results

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

Page 20/1445 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • inserting data into mysql

    - by francesco
    Hi Guys, My insert and update pages (through my admin forlder) into mysql stopped working. When I try to insert/update details it stays on the same page without adding or updating anything into the database table. I really don't know what happened and don't know where start looking. I didn't make any change to the pages whatsoever. Is there anyone who had the same problem and can kindly give me a clue? Appreciated Francesco

    Read the article

  • 2k rows update is very slow in MySQL

    - by sergeik
    Hi all, I have 2 tables: 1. news (450k rows) 2. news_tags (3m rows) There are some triggers on news table update which updating listings. This SQL executes too long... UPDATE news SET news_category = some_number WHERE news_id IN (SELECT news_id FROM news_tags WHERE tag_id = some_number); #about 3k rows How can I make it faster? Thanks in advance, S.

    Read the article

  • How to know about MySQL 'refused connections'

    - by celalo
    Hello, I am using MONyog to montitor my two mysql servers. I get alert emails from MONyog when something goes wrong. There is an error I could not find out why. It says: Connection History: Percentage of refused connections) - 66.67% the percentage is not important, this is just about having refused connections. I get this email every half an hour. So this is like a constant situation. This must be my mistake, because I just set up those servers and there is no chance somebody else could be interfering the servers. MONyog advices me: Try to isolate users/applications that are using an incorrect password or trying to connect from unauthorized hosts. A client will be disallowed to connect if it takes more than connect_timeout seconds to connect. Set the value of log_warnings system variable to 2. This will force the MySQL server to log further information about the error. I added log_warnings=2 to my.cnf and I enabled logging like this: [mysqld_safe] . . log_warnings=2 log-error = /var/log/mysql/error.log . . . . [mysqld_safe] . log-error=/var/log/mysqld.log . . I cannot see any warnings at /var/log/mysql/error.log I can see some warnings at /var/log/mysqld.log but they are about something else. In sum, my question is how can I detect refused connections? Please let me know if any more info is required. Thanks in advance.

    Read the article

  • xampp mysql and rubby

    - by user115079
    I've installed ruby and xampp server. now i am trying to use xampp mysql for ruby application. i copied xampp mysql lib (libmysql) from C:\xampp\mysql\lib to C:\Ruby192\bin (as told on some post on this forum). now after that when i try to create a resource using following command, i get an error. command: rails generate scaffold ShortUrl url:string error: C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.5.16. (RuntimeError) i know that there is version issue b/w ruby mysql client and xampp mysal. now i need advice that what is better solution? upgraded xampp mysql or downgrade ruby mysql version. Personally i want to upgrade xampp mysql but i read on some post that xampp mysql can't be upgraded. please advise.

    Read the article

  • MySQL - Powering Online Media & Entertainment

    - by bertrand.matthelie(at)oracle.com
    @font-face { font-family: "Arial"; }@font-face { font-family: "Courier New"; }@font-face { font-family: "Times"; }@font-face { font-family: "Wingdings"; }@font-face { font-family: "Cambria"; }p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: "Times New Roman"; }a:link, span.MsoHyperlink { color: blue; text-decoration: underline; }a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; }p { margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: "Times New Roman"; }div.Section1 { page: Section1; }ol { margin-bottom: 0cm; }ul { margin-bottom: 0cm; } If you're reading news, watching videos, or playing games online, you're probably relying on MySQL to do so.   Facebook, YouTube, BBC News, Zynga, thePlatform and many other leading Media & Entertainment organizations chose MySQL to power their online news, gaming, social networking, advertising or other applications.   During the past decade, the Media & Entertainment industry experienced a spectacular transformation.  The mobile Internet is becoming the dominant media platform, and the boundaries between the different types of media (i.e. Print, TV, Radio, Internet) have increasingly blurred as we've gradually come to perform more and more of our daily activities online.   To better understand how MySQL can help you win in the fast paced world of Media & Entertainment, check out our whitepaper "MySQL - Powering The Online Media & Entertainment Industry" in which we cover:   ·       The key trends shaping the evolution of the media & entertainment industry.   ·       Their implications, and the requirements they place on the infrastructure of information & entertainment services providers.   ·       How you can leverage Oracle's MySQL technologies to quickly and cost-effectively deliver new highly scalable and highly available online media & entertainment applications.   You're welcome to download it here.

    Read the article

  • MySQL: "UPDATE command denied to user ''@'localhost'"

    - by Uncle Nerdicus
    For some reason when I installed MySQL on my machine (a Mac running OS X 10.9) the 'root' MySQL account got messed up and I don't have access to it, but I do have access to the standard MySQL account 'sean@localhost' which I use to log into phpMyAdmin. I am trying to reset the 'root' password by starting the mysqld daemon using the command mysqld --skip-grant-tables and then running the following lines in the mysql shell. mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') -> WHERE User='root'; mysql> FLUSH PRIVILEGES; Problem is when I try to run that MySQL string the daemon spits back a ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user' as if I didn't use the -u argument when I started the mysql shell, either though I did. Any help is muchly appreciated as I am lost at this point. :/

    Read the article

  • Three Ways to Take Official MySQL for Database Administrators course

    - by Antoinette O'Sullivan
    The MySQL for Database Administrators course is a 5 day course that teaches the key skills essential for MySQL Database Administrators. You can take this course in one of the following three ways: Training on Demand: Get Instructor-led training within 24 hours through streaming-video from your desk. Live Virtual Class: Live instructor-led training from your desk. Over 1000! LVC events on the schedule for the MySQL for Database Administrator course. In Class: See below for a selection of locations where you can take this training For more information on this course or teaching schedule, go to the Oracle University portal and click on MySQL or search under your country/location. A selection of the In-Class schedule for the MySQL for Database Administrator course:  Location  Date  Delivery Language  Mechelen, Belgium  10 Sept 2012  English  Prague, Czech Republic  27 Aug 2012  Czech  Nice, France  24 Sept 2012  French  Paris, France  24 Sept 2012  French  Strasbourg, France  10 Sept 2012  French  Dresden, Germany  20 Aug 2012  German  Gummersbach, Germany  27 Aug 2012  German  Hamburg, Germany  23 July 2012  German  Munich, Germany  16 July 2012  German  Munster, Germany  6 Aug 2012  German  Stuttgart, Germany  9 July 2012  German  London, Great Britan  9 July 2012  English  Belfast, Ireland  27 Aug 2012  English  Rome, Italy  30 July 2012  Italian  Windhof, Luxembourg  26 Nov 2012  English  Nieuwegein, Netherlands  1 Oct 2012  English  Oslo, Norway  10 Sept 2012  English  Warsaw, Poland  9 July 2012  Polish  Lisbon, Portugal  3 Sept 2012  European Portugese  Madrid, Spain  25 Jun 2012  Spanish  Baden Dattwil, Switzerland  19 Nov 2012  German  Zurick, Switzerland  8 Aug 2012  German  Istanbul, Turkey  27 Aug 2012  Turkish  Petaling Jaya, Malaysia  25 Jul 2012  English  Singapore  16 July 2012  English  Brisbane, Australia  30 July 2012  English  Bangkok, Thailand  30 July 2012  Thai  Edmonton, Canada  10 Sept 2012  English  Vancouver, Canada  10 Sept 2012  English  Ottawa, Canada  30 July 2012  English  Toronto, Canada  30 July 2012  English  Montreal, Canada  30 July 2012  English  Mexico City, Mexico  25 Jun 2012  Spanish With these three delivery options and an impressive LVC and In-Class schedule you should find an event to suit your needs. If you are interested in another date or location you can register your interest on the Oracle University portal.

    Read the article

  • MySql service stops under 2008 r2 x64

    - by volody
    I have installed MySql 5.5 server under windows 2008r2 x64 Apparently I can see that MySql service stops even if is configured to start automatically What can I do to find out why this is happening? MySql database is used as backend of ASP.Net web site Is it possible that web site was not active for a while and system stop mysql service? Update: It was mysql-5.5.7-rc-winx64. I could be an issue with this version (release candidate). Now I am trying to install mysql-5.5.8-winx64 And I have an issue with configuring MySql to work using name pipes I did uncheck use of TCP/IP protocol and configuration wizard just hangs Update: I have found workaround. It is required to configure MySql to use TCP/IP first, then reconfigure to use named pipes It looks like this link also has some information about the possible problems How should I diagnose ERROR 1045 during MySQL installation?

    Read the article

  • Is there any good hosting for asp.net and MySQL

    - by HAJJAJ
    HI every one ,I have account with one of the hosting company, and i did my project in asp.net and I used MySQL for the database. the hosting company is not giving me the full privileges to create new user or to create new stored procedure!!! this is what they said for me: Due to the shared nature of our environment we had to make some modifications to your procedure (namely the definer). We also had to review your procedure to determine if it would be compatible with our environment. While your procedures will work (via phpMyAdmin or some other interface), it is unlikely they will be accessible via the Connector/.NET (ADO.NET) that your application is likely using. This is due to a security restriction with how that connector works in shared environments. http://dev.mysql.com/doc/refman/5.0/en/connector-net-programming-stored.html "Note When you call a stored procedure, the command object makes an additional SELECT call to determine the parameters of the stored procedure. You must ensure that the user calling the procedure has the SELECT privilege on the mysql.proc table to enable them to verify the parameters. Failure to do this will result in an error when calling the procedure." Unfortunately, giving read privileges on the mysql.proc table will give you access to the data of our other customers and that is not an acceptable risk. If your application can only work using stored procedures, then MSSQL will probably be the better option for your site. I apologize for the inconvenience and the wait to have this ticket completed. So is there any good hosting that any body already used it to publish his asp.net and mysql project ??? this is one of my stored procedure and i think it's sample and it will not harm any other uses!!: -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `SpcategoriesRead`( IN PaRactioncode VARCHAR(5), IN PaRCatID BIGINT, IN PaRSearchText TEXT ) BEGIN -- CREATING TEMPORARY TABLE TO SAVE DATA FROM THE ACTIONCODE SELECTS -- DROP TEMPORARY TABLE IF EXISTS TEMP; CREATE temporary table tmp ( CatID BIGINT primary key not null, CatTitle TEXT, CatDescription TEXT, CatTitleAr TEXT, CatDescriptionAr TEXT, PictureID BIGINT, Published BOOLEAN, DisplayOrder BIGINT, CreatedOn DATE ); IF PaRactioncode = 1 THEN -- Retrive all DATA from the database -- INSERT INTO tmp SELECT CatID,CatTitle,CatDescription,CatTitleAr,CatDescriptionAr,PictureID,Published,DisplayOrder,CreatedOn FROM tbcategories; ELSEIF PaRactioncode = 2 THEN -- Retrive all from the database By ID -- INSERT INTO tmp SELECT CatID,CatTitle,CatDescription,CatTitleAr,CatDescriptionAr,PictureID,Published,DisplayOrder,CreatedOn FROM tbcategories WHERE CatID=PaRCatID; ELSEIF PaRactioncode = 3 THEN -- NOSET YET -- INSERT INTO tmp SELECT CatID,CatTitle,CatDescription,CatTitleAr,CatDescriptionAr,PictureID,Published,DisplayOrder,CreatedOn FROM tbcategories WHERE Published=1 ORDER BY DisplayOrder; END IF; IF PaRSearchText IS NOT NULL THEN set PaRSearchText=concat('%', PaRSearchText ,'%'); SELECT CatID,CatTitle,CatDescription,CatTitleAr,CatDescriptionAr,PictureID,Published,DisplayOrder,CreatedOn FROM tmp WHERE Concat(CatTitle, CatDescription, CatTitleAr, CatDescriptionAr) LIKE PaRSearchText; ELSE SELECT CatID,CatTitle,CatDescription,CatTitleAr,CatDescriptionAr,PictureID,Published,DisplayOrder,CreatedOn FROM tmp; END IF; DROP TEMPORARY TABLE IF EXISTS tmp; END

    Read the article

  • Monit can't detect MySQL, but I can

    - by Matchu
    Monit is configured to watch MySQL on localhost at port 3306. check process mysqld with pidfile /var/lib/mysql/li175-241.pid start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" if failed port 3306 protocol mysql then restart if 5 restarts within 5 cycles then timeout My application, which is configured to connect to MySQL via localhost:3306, is running just fine and can access the database. I can even use MySQL Query Browser to connect to the database remotely via port 3306. The port is totally open and possible to connect to. Therefore, I'm pretty darn certain that it's running. However, running monit -v reveals that Monit cannot detect MySQL on that port. 'mysqld' failed, cannot open a connection to INET[localhost:3306] via TCP This happens consistently, until Monit decides not to track MySQL anymore, as configured. How can I begin to troubleshoot this issue?

    Read the article

  • MySQL Connect Keynotes and Presentations Available Online

    - by Bertrand Matthelié
    72 1024x768 Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Following the tremendous success of MySQL Connect, you can now watch some of the keynotes online: The State of the Dolphin – by Oracle Chief Corporate Architect Edward Screven and MySQL Vice President of Engineering Tomas Ulin 72 1024x768 Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Cambria","serif";} MySQL Perspectives – featuring power users of MySQL who share their experiences and perspectives: Jeremy Cole, DBA Team Manager, Twitter Daniel Austin, Chief Architect, PayPal Ash Kanagat, IT Director; and Shivinder Singh, Database Architect, Verizon Wireless You can also access slides from a number of MySQL Connect presentations in the Content Catalog. Missing ones will be added shortly (provided the speakers consented to it). Enjoy!

    Read the article

  • Getting the general log to work in MySQL 5.6.8

    - by Benjamin
    I can't get the general log to work in this version of MySQL. I added the following lines to /usr/my.cnf: general_log = 1 general_log_file = "/var/log/mysql.log" Then restarted the server: [root@localhost ~]# service mysql restart Shutting down MySQL.. SUCCESS! Starting MySQL. SUCCESS! The settings seem to be taken into account: mysql> SHOW VARIABLES LIKE 'general_log%'; +------------------+--------------------+ | Variable_name | Value | +------------------+--------------------+ | general_log | ON | | general_log_file | /var/log/mysql.log | +------------------+--------------------+ 2 rows in set (0.01 sec) But the log is never created: [root@localhost ~]# mysqladmin flush-logs [root@localhost ~]# ls -al /var/log/mysql.log ls: cannot access /var/log/mysql.log: No such file or directory Any idea why?

    Read the article

  • Win 7: Are motherboard / chipset drivers part of the Software Update?

    - by Horst Walter
    Is the Windows 7 update automatically updating Chipset and motherboard drivers? I am basically talking about mainstream boards / processors (ASUS; Intel, AMD, ...), so the question reads "in general". Certainly there are exotic system not updated automatically. This is a duplicate of dangling Will Windows 7 Update Find Chipset Drivers? (one answer, no acceptance, comment directly questions the answer). I am interested in this topic as well, so I dare to ask the question again.

    Read the article

  • MySQL Enterprise Monitor 3.0.11 has been released

    - by Andy Bang
    We are pleased to announce that MySQL Enterprise Monitor 3.0.11 is now available for download on the My Oracle Support (MOS) web site. It will also be available via the Oracle Software Delivery Cloud in about 1 week. This is a maintenance release that includes a few new features and fixes a number of bugs. You can find more information on the contents of this release in the change log. You will find binaries for the new release on My Oracle Support. Choose the "Patches & Updates" tab, and then choose the "Product or Family (Advanced Search)" side tab in the "Patch Search" portlet. You will also find the binaries on the Oracle Software Delivery Cloud in approximately 1 week. Choose "MySQL Database" as the Product Pack and you will find the Enterprise Monitor along with other MySQL products. Based on feedback from our customers, MySQL Enterprise Monitor (MEM) 3.0 offers many significant improvements over previous releases. Highlights include: Policy-based automatic scheduling of rules and event handling (including email notifications) make administration of scale-out easier and automatic Enhancements such as automatic discovery of MySQL instances, centralized agent configuration and multi-instance monitoring further improve ease of configuration and management The new cloud and virtualization-friendly, "agent-less" design allows remote monitoring of MySQL databases without the need for any remote agents Trends, projections and forecasting - Graphs and Event handlers inform you in advance of impending file system capacity problems Zero Configuration Query Analyzer - Works "out of the box" with MySQL 5.6 Performance_Schema (supported by 5.6.14 or later) False positives from flapping or spikes are avoided using exponential moving averages and other statistical techniques Advisors can analyze data across an entire group; for example, the Replication Configuration Advisor can scan an entire topology to find common configuration errors like duplicate server UUIDs or a slave whose version is less than its master's More information on the contents of this release is available here: What's new in MySQL Enterprise Monitor 3.0? MySQL Enterprise Edition: Demos MySQL Enterprise Monitor Frequently Asked Questions MySQL Enterprise Monitor Change History More information on MySQL Enterprise and the Enterprise Monitor can be found here: http://www.mysql.com/products/enterprise/ http://www.mysql.com/products/enterprise/monitor.html http://www.mysql.com/products/enterprise/query.html http://forums.mysql.com/list.php?142 If you are not a MySQL Enterprise customer and want to try the Monitor and Query Analyzer using our 30-day free customer trial, go to http://www.mysql.com/trials, or contact Sales at http://www.mysql.com/about/contact. If you haven't looked at MEM recently, and especially MEM 3.0, please do so now and let us know what you think. Thanks and Happy Monitoring! - The MySQL Enterprise Tools Development Team

    Read the article

  • MySQL Workbench 6.2.1 BETA has been released

    - by user12602715
    The MySQL Workbench team is announcing availability of the first beta release of its upcoming major product update, MySQL  Workbench 6.2. MySQL Workbench 6.2 focuses on support for innovations released in MySQL 5.6 and MySQL 5.7 DMR (Development Release) as well as MySQL Fabric 1.5, with features such as: A new spatial data viewer, allowing graphical views of result sets containing GEOMETRY data and taking advantage of the new GIS capabilities in MySQL 5.7. Support for new MySQL 5.7.4 SQL syntax and configuration options. Metadata Locks View shows the locks connections are blocked or waiting on. MySQL Fabric cluster connectivity - Browsing, view status, and connect to any MySQL instance in a Fabric Cluster. MS Access migration Wizard - easily move to MySQL Databases. Other significant usability improvements were made, aiming to raise productivity for advanced and new users: Direct shortcut buttons to commonly used features in the schema tree. Improved results handling. Columns have better auto-sizing and their widths are saved. Fonts can also be customized. Results "pinned" to persist viewing data. A convenient Run SQL Script command to directly execute SQL scripts, without loading them first. Database Modeling has been updated to allow changes to the formatting of note objects and attached SQL scripts can now be included in forward engineering and synchronization scripts. Integrated Visual Explain within the result set panel. Visual Explain drill down for large to very large explain plans. Shared SQL snippets in the SQL Editor, allowing multiple users to share SQL code by storing it within a MySQL instance. And much more. The list of provided binaries was updated and MySQL Workbench binaries now available for: Windows 7 or newer Mac OS X Lion or newer Ubuntu 12.04 LTS and Ubuntu 14.04 Fedora 20 Oracle Linux 6.5 Oracle Linux 7 Sources for building in other Linux distributions For the full list of changes in this revision, visit http://dev.mysql.com/doc/relnotes/workbench/en/changes-6-2.html For discussion, join the MySQL Workbench Forums: http://forums.mysql.com/index.php?151 Download MySQL Workbench 6.2.1 now, for Windows, Mac OS X 10.7+, Oracle Linux 6 and 7, Fedora 20, Ubuntu 12.04 and Ubuntu 14.04 or sources, from: http://dev.mysql.com/downloads/tools/workbench/ On behalf of the MySQL Workbench and the MySQL/ORACLE RE Team.

    Read the article

  • MySQL Enterprise Monitor 3.0.3 Is Now Available

    - by Andy Bang
    We are pleased to announce that MySQL Enterprise Monitor 3.0.3 is now available for download on the My Oracle Support (MOS) web site. It will also be available via the Oracle Software Delivery Cloud with the November update in about 1 week. This is a maintenance release that fixes a number of bugs. You can find more information on the contents of this release in the change log. You will find binaries for the new release on My Oracle Support. Choose the "Patches & Updates" tab, and then use the "Product or Family (Advanced Search)" feature. You will also find the binaries on the Oracle Software Delivery Cloud in approximately 1 week. Choose "MySQL Database" as the Product Pack and you will find the Enterprise Monitor along with other MySQL products. Based on feedback from our customers, MySQL Enterprise Monitor (MEM) 3.0 offers many significant improvements over previous releases. Highlights include: Policy-based automatic scheduling of rules and event handling (including email notifications) make administration of scale-out easier and automatic Enhancements such as automatic discovery of MySQL instances, centralized agent configuration and multi-instance monitoring further improve ease of configuration and management The new cloud and virtualization-friendly, "agent-less" design allows remote monitoring of MySQL databases without the need for any remote agents Trends, projections and forecasting - Graphs and Event handlers inform you in advance of impending file system capacity problems Zero Configuration Query Analyzer - Works "out of the box" with MySQL 5.6 Performance_Schema (supported by 5.6.14 or later) False positives from flapping or spikes are avoided using exponential moving averages and other statistical techniques Advisors can analyze data across an entire group; for example, the Replication Configuration Advisor can scan an entire topology to find common configuration errors like duplicate server UUIDs or a slave whose version is less than its master's More information on the contents of this release is available here: What's new in MySQL Enterprise Monitor 3.0? MySQL Enterprise Edition: Demos MySQL Enterprise Monitor Frequently Asked Questions MySQL Enterprise Monitor Change History More information on MySQL Enterprise and the Enterprise Monitor can be found here: http://www.mysql.com/products/enterprise/ http://www.mysql.com/products/enterprise/monitor.html http://www.mysql.com/products/enterprise/query.html http://forums.mysql.com/list.php?142 If you are not a MySQL Enterprise customer and want to try the Monitor and Query Analyzer using our 30-day free customer trial, go to http://www.mysql.com/trials, or contact Sales at http://www.mysql.com/about/contact. If you haven't looked at MEM recently, and especially MEM 3.0, please do so now and let us know what you think. Thanks and Happy Monitoring! - The MySQL Enterprise Tools Development Team

    Read the article

  • Update multiple rows with known keys without inserting new rows if nonexistent keys are found

    - by Kirzilla
    Hello, Let's imagine that we have table items... table: items item_id INT PRIMARY AUTO_INCREMENT title VARCHAR(255) views INT Let's imagine that it is filled with something like (1, item-1, 10), (2, item-2, 10), (3, item-3, 15) I want to make multi update view for this items from data taken from this array [item_id] = [views] '1' => '50', '2' => '60', '3' => '70', '5' => '10' IMPORTANT! Please note that we have item_id=5 in array, but we don't have item_id=5 in database. I can use INSERT ... ON DUPLICATE KEY UPDATE, but this way image_id=5 will be inserted into talbe items. How to avoid inserting new key? I just want item_id=5 be skipped because it is not in table. Of course, before execution I can select existing keys from items table; then compare with keys in array; delete nonexistent keys and perform INSERT ... ON DUPLICATE KEY UPDATE. But maybe there is some more elegant solutions? Thank you.

    Read the article

  • how to atomically claim a row or resource using UPDATE in mysql

    - by Igor
    i have a table of resources (lets say cars) which i want to claim atomically. if there's a limit of one resource per one user, i can do the following trick: UPDATE cars SET user = 'bob' WHERE user IS NULL LIMIT 1 SELECT * FROM cars WHERE user IS bob that way, i claim the resource atomically and then i can see which row i just claimed. this doesn't work when 'bob' can claim multiple cars. i realize i can get a list of cars already claimed by bob, claim another one, and then SELECT again to see what's changed, but that feels hackish. What I'm wondering is, is there some way to see which rows i just updated with my last UPDATE? failing that, is there some other trick to atomically claiming a row? i really want to avoid using SERIALIZABLE isolation level. If I do something like this: 1 SELECT id FROM cars WHERE user IS NULL 2 <here, my PHP or whatever picks a car id> 3 UPDATE cars SET user = 'bob' WHERE id = <the one i picked> would REPEATABLE READ be sufficient here? in other words, could i be guaranteed that some other transactions won't claim the row my software has picked during step 2?

    Read the article

  • What's wrong with this SQL UPDATE query?

    - by Tommo
    I wouldn't ask if i wasn't sure that i have 100% no idea why this isn't working, so, in PHP i'm simply trying to update a value in the MySQL database: The field im updating - Name: read - Type: tinyint - Length: 1 Here is the PHP code: do_SQL("UPDATE messages SET read=1 WHERE id='".$id."'"); The do_SQL function is working for everything else, so it's something wrong with this statement. I have tried putting 1 in '1' and it still didn't work.m The error is: 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 'read=1 WHERE id='1'' at line 1 Thanks for reading!

    Read the article

  • MySQL, C++: Retrieving auto-increment ID

    - by Thomas Matthews
    I have a table with an auto-incrementing ID. After inserting a new row, I would like to retrieve the new ID. I found an article that used the MySQL function LAST_INSERT_ID(). The article says to create a new query and submit it. I'm using MySQL Connector C++, Windows XP and Vista, and Visual Studio 9. Here are my questions: Is there an API, for the connector, that will fetch the ID out of the record? Does the result set, after an insert/append, contain the new ID? The LAST_INSERT_ID is MySQL specific. Is there an SQL standard method for obtaining the new ID?

    Read the article

  • Best implementation for MySQL replication with Rails 3?

    - by vonconrad
    We're looking at potentially setting up replication for our primary MySQL database, and while setting up the replication seems pretty straight-forward, the application implementation seems a bit murkier. My first idea would be to set up a master-slave configuration and RW-splitting, with all write queries (CREATE, INSERT, UPDATE) going to master, and all read queries (SELECT) going to slave. Having read up on it, it seems that there are essentially two options for how to implement this with our app: Using an independent middleware layer for all MySQL connections, such as MySQL proxy or DBSlayer. However, the former is in Alpha and the latter has limited documentation. Using a Ruby-based gem/plugin, such as Octopus to achieve RW-splitting in the framework. If we wanted to go with a master-slave setup, what you recommend moving forward? The other thought I've had was to use a master-master configuration, but am unsure about the implementation of such a setup. Thoughts?

    Read the article

  • Can't delete a mySQL table. (Error 1050)

    - by doublejosh
    I have a pesky table that will not delete and it's holding up my dev environment refresh :( I know this table exists. Example... mysql> select * from uc_order_products_qty_vw limit 10; +-----+-------------+---------+---------+---------+---------+ | nid | order_count | avg_qty | sum_qty | max_qty | min_qty | +-----+-------------+---------+---------+---------+---------+ | 105 | 1 | 1.0000 | 1 | 1 | 1 | | 110 | 5 | 1.0000 | 5 | 1 | 1 | | 111 | 1 | 1.0000 | 1 | 1 | 1 | | 113 | 5 | 1.0000 | 5 | 1 | 1 | | 114 | 1 | 1.0000 | 1 | 1 | 1 | | 115 | 1 | 1.0000 | 1 | 1 | 1 | | 117 | 2 | 1.0000 | 2 | 1 | 1 | | 119 | 3 | 1.3333 | 4 | 2 | 1 | | 190 | 5 | 1.0000 | 5 | 1 | 1 | | 199 | 2 | 1.0000 | 2 | 1 | 1 | +-----+-------------+---------+---------+---------+---------+ 10 rows in set (0.00 sec) However when I try to drop it... mysql> DROP TABLE IF EXISTS uc_order_products_qty_vw; Query OK, 0 rows affected, 1 warning (0.00 sec) It doesn't work, the table is still there, and the warning says this... mysql> show warnings limit 1; +-------+------+------------------------------------------+ | Level | Code | Message | +-------+------+------------------------------------------+ | Note | 1051 | Unknown table 'uc_order_products_qty_vw' | +-------+------+------------------------------------------+ 1 row in set (0.00 sec) Feeling pretty dumbfounded.

    Read the article

  • mysql select update

    - by Tillebeck
    Hi I have read quite a few selcet+update questions in here but cannot understand how to do it. So will have to ask from the beginning. I would like to update a table based on data in another table. Setup is like this: - TABLE a ( int ; string ) ID WORD 1 banana 2 orange 3 apple - TABLE b ( "comma separated" string ; string ) WORDS TEXTAREA 0 banana -> 0,1 0 orange apple apple -> BEST:0,2,3 ELSE 0,2,3,3 0 banana orange apple -> 0,1,2,3 Now I would like to for each word in TABLE a append ",a.ID" to b.WORDS like: SELECT id, word FROM a (for each) -> UPDATE b SET words = CONCAT(words, ',', a.id) WHERE b.textarea like %a.word% Or even better: replace the word found in b.textarea with ",a.id" so it is the b.textarea that ends up beeing a comma separeted string of id's... But I do not know if that is possible.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >