stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Adding & Changing Data in MySQL







Adding & Changing Data in MySQL

Adding & Changing Data in MySQL 04/09/2004 04:05 PM

"There are several ways to add and to change data in MySQL. There are a few SQL statements that you can use, each with a few options. Additionally, there are twists that you can do by mixing SQL statements together with various clauses, some of which are available with the release of version 4 of MySQL. In this article, I will explore the ways in which data can be added and changed in MySQL." Story




This is a GrokNews Entry: (what is grok?)





Similar Items

Adding & Changing Data in MySQL

Grok Headline matches for Adding & Changing Data in MySQL

MySQL and Terabytes of Data?


MySQL and Terabytes of Data? 12/06/2002 04:09 PM
It sounds like I'll be helping with some multi-terabyte MySQL tests in the not too distant future. This is good not just because I get to play with neat toys, but it'll finally help me to answer the "how well...

Backing up your MySQL data


Backing up your MySQL data 12/27/2004 03:08 AM
If you have ever pulled your hair out in frustration over data loss, no doubt the word 'backup' has special meaning in your life. Databases offer a nice way to catalog data, but with the amount of data being trusted into MySQL databases these days, the after-effects of an unwise DROP DATABASE command, an unlucky system crash, or a failed hand-edit of the table structure are catastrophic and can be unrecoverable -- unless you have a backup to restore from.

Mysql Data Manager 1.72'


Mysql Data Manager 1.72' 12/25/2003 04:21 PM
Advanced client for Mysql over TCP/IP.

Data On-Demand Expert Evolving Solutions
Announces Record Growth - Responds to
Changing Technology Needs with Storage &
Server Virtualization


Data On-Demand Expert Evolving Solutions
Announces Record Growth - Responds to
Changing Technology Needs with Storage &
Server Virtualization
03/14/2005 06:10 PM
Evolving Solutions, a data on-demand and server virtualization expert, has announced record growth for the fiscal year 2004. [PRWEB Feb 24, 2005]

NewsForge: Backing Up Your MySQL Data


NewsForge: Backing Up Your MySQL Data 12/28/2004 07:36 PM
"If you have ever pulled your hair out in frustration over data loss, no doubt the word 'backup' has special meaning in your life..."

Transferring Data to MySQL Using SQLyog


Transferring Data to MySQL Using SQLyog 03/11/2003 01:23 AM
Need any easy way to import data from your ODBC-compliant database into MySQL? Look no further than SQLyog's ODBC Import tool. Read all about it inside.

Data Globbing with MySQL Regex


Data Globbing with MySQL Regex 07/13/2004 11:50 PM

As I become a more experienced developer, I'm learning when you should and shouldn't break the rules. While following every rule of programming and data modeling is wonderful, sometimes you need to bend the rules for the sake of simplicity and expediency.

Always remember, an app in the hand is worth a thousand on the white board.

This being the case, lately I've been known to "glob" up data in database fields. Yes, I know this breaks the first normal form — that of atom icity — but there are times when doing it right would involve three more queries, two more database tables, another UI screen, etc. Often it makes the cure worse than the disease.

For instance, consider this little XML document as the contents of the "children" field for one of the records in my "church_attender" table:


<children>
  <child>
    <first_name>Isabella</first_name> ;
    <last_name>Barker</last_name>
  </child>
  <child>
    <first_name>Gabrielle</first_name&g t;
    <last_name>Barker</last_name>
  </child>
</children>

Now if I never wanted to search for individual children, I would make no excuses for this. It saves us a database table, a join, and a ton of complexity in the interface. Life is good.

Searching a globbed up field is a problem, though. We alluded to it in this post when we said:

However, the problem is that the XML field is a black box that — on most database platforms — you can't look inside. What if you want a list of articles written by a particular author? Well, you need to use SQL to get all the XML back, spin that collection, XPath into every single one to find the value author of the author node, then keep that record it matches.

So what if I want to find a person with a child named Gabrielle? Some databases (Oracle, for one), will let you do something like this:


SELECT * FROM church_attender WHERE XPATH(children,'/child/first_name') = 'Gabrielle'

That'd be great, but I don't have Oracle. However, given our experience this week with MySQL regular expressions, how unacceptable would this be:


SELECT * FROM church_attender WHERE children LIKE '%Gabrielle%' AND children RLIKE '<children>.*<child>.*<first_name> Gabrielle </first_name>.*</child>.*</children>'

(Note that there are some extra spaces in there just so the lines would wrap.)

Yes, yes, I know the database Gods would frown on this, but given the enourmous amount of complexity it would save us, is it acceptable? Does the good outweigh the bad?

Fishing for opinions here. Let's hear them.

Click here to comment on this entry


Sybase, MySQL, IBM boost data management


Sybase, MySQL, IBM boost data management 04/19/2004 08:26 AM
Database vendors Sybase, MySQL, and IBM are lacing products with features that improve access to information and offer clustering and fault tolerance.

Synchronize MySQL Data Using SQLyog Job
Agent


Synchronize MySQL Data Using SQLyog Job
Agent
02/10/2004 02:42 AM
What's the best and most efficient way to synchronize data between two MySQL databases? Using SQLyog Job Agent (SJA)! Karam shows us how to use SJA to your advantage in this quick-and-easy tutorial.

Open Sourcery: Backing Up Your MySQL
Data


Open Sourcery: Backing Up Your MySQL
Data
05/05/2004 08:16 AM
MySQL has had, quite possibly, one of the most impressive climbs to fame of any Open Source based software I know. Of course, with this fame, there are more and more people out there downloading it and setting it up on their servers/home machines. Once it's up and working, though, one of the most common questions is "how can I backup my information?". Well, with a new posting this morning, Open Sourcery hopes to provide you with an easy and quick example.

Zend: Growing a Tree of Data with PHP
and MySQL


Zend: Growing a Tree of Data with PHP
and MySQL
11/12/2002 08:35 AM

Computerworld: MySQL Breaks Into the
Data Center


Computerworld: MySQL Breaks Into the
Data Center
10/29/2003 12:10 AM
"Once dismissed as inadequate for high transaction volumes, the open-source database's improved performance and low cost are winning new converts--and shaking up the status quo in the database world..."

How to access MySQL data in Filemaker
via ODBC


How to access MySQL data in Filemaker
via ODBC
02/10/2004 12:01 PM
In order to import data from a MySQL database into FileMaker 6 via ODBC, do not install the DataDirect ODBC driver that comes with FileMaker. Instead, download the OpenLink one.If you decided to install the DataDirect driver...

EnGarde Secure Linux Advisory: MySQL,
MySQL-client, MySQL-shared, mod_php, php


EnGarde Secure Linux Advisory: MySQL,
MySQL-client, MySQL-shared, mod_php, php
12/16/2002 04:17 PM
"Stefan Esser from the PHP.net project discovered two vulnerabilities in MySQL which range from crashing the server to executing arbitrary code as the user under which the MySQL daemon runs (mysql)..."

SearchEnterpriseLinux: MySQL CEO: Open
Source MySQL Will Rise, Legal Foes Will
Fall


SearchEnterpriseLinux: MySQL CEO: Open
Source MySQL Will Rise, Legal Foes Will
Fall
02/01/2005 09:06 PM
"None of the legal attacks on open source or Linux have been successful. None of that stuff has gone anywhere. That's the biggest story..."

MySQL: MySQL Administrator Now Availible


MySQL: MySQL Administrator Now Availible 02/12/2004 10:10 AM
In a new note passed along to me from MarkL this morning, there's some new information about the admin tool that the MySQL folks have created.

MySQL: MySQL Administrator Announced


MySQL: MySQL Administrator Announced 01/22/2004 10:26 AM
In a startling new note from the MySQL development team, information about their newest application has been posted on their site.

Adding value to IT


Adding value to IT 04/13/2005 01:43 AM
ZDNet Apr 13 2005 5:35AM GMT

Adding SALT to the Mix


Adding SALT to the Mix 11/01/2002 02:46 PM
The voice technology standard for software applications continues to gain steam, but it's going to be a tough act to add it to the W3C plate.

Adding Ads Adversely?


Adding Ads Adversely? 12/09/2003 02:37 AM

Does anyone else think it's weird that newspapers like the Chicago Sun-Times are using Google's Ad-Words program (current example, but I think you can see the ads at the bottom of most pages)? What an interesting way to get your ad in the local newspaper. Makes for some< /A> inte resting dichot omies, too! I wonder if they've really thought this through....


IBM Adding Almost 19,000 Jobs


IBM Adding Almost 19,000 Jobs 08/12/2004 08:20 PM

Adding loops to GarageBand


Adding loops to GarageBand 01/22/2004 02:50 AM
PowerFX has announced a collection of add-in loops for GarageBand or Soundtrack. I haven't seen any instructions for adding loops to GarageBand, so here's how to do it.

Adding a New Supported Platform


Adding a New Supported Platform 07/17/2004 06:49 AM

Adding a User to a Group


Adding a User to a Group 07/26/2004 07:26 AM

Adding Comments to a .reg File


Adding Comments to a .reg File 07/13/2004 10:13 AM

Sun adding third-party support to JES


Sun adding third-party support to JES 07/27/2004 09:20 AM
Sun Microsystems Inc. is extending support for its Java Enterprise System (JES) to third-party operating systems and hardware platforms in a move aimed at gaining more uptake for the server software and throwing more weight behind its pricing model, the company said Tuesday.

Adding Audio to Blogs


Adding Audio to Blogs 01/28/2004 12:27 PM
Don't know how I missed this, but it's been around for a month: SoundBlox is "an MP3 audio playing Internet application that can be embedded into a personal blog template or Web page, and displayed in any modern Web browser." It's for non-commercial use, which excludes me on this blog, but I still intend to play with it on another blog I use for experimentation. Nice.

Adding Simplicity (TechWeb)


Adding Simplicity (TechWeb) 08/08/2004 04:03 AM
TechWeb - Automated, model-driven architecture could be your ticket to simpler, less painful enterprise development.

Adding a Printer Connection


Adding a Printer Connection 09/07/2004 09:51 PM

Adding .NET Control Properties


Adding .NET Control Properties 05/03/2004 09:00 PM
DDJ May 4 2004 0:50AM GMT

Adding USB Ports to a Pocket PC


Adding USB Ports to a Pocket PC 06/03/2004 11:42 PM
Add a Couple of USB Slots to Your Pocket PCSolarExpress PDA

"A new CompactFlash adapter from Twin Paradox so you can plug any USB gadgets like printers, mice, digital cameras, hard drives, and keyboards directly into your Pocket PC (assuming you have the drivers for it). The SolarExpress PDA should be out next month. [Via Pocket PC Thoughts]" [Engadget]

So not only will patrons bring in their own USB flash drives to use in our buildings, but now they'll also expect to be able to hook their own devices up to a USB cable on our computers!


Adding SALT to HTML


Adding SALT to HTML 02/05/2005 09:37 PM
XML Feb 5 2005 12:11AM GMT

Adding a Printer Using VB Script


Adding a Printer Using VB Script 05/28/2004 12:27 PM

Adding Mail with Exim


Adding Mail with Exim 03/17/2005 02:48 AM
PHP must have access to the Sendmail binary during compile time if its mail() function is desired. However, Exim can replace sendmail as shown how in this tutorial.

Adding Style To Substance


Adding Style To Substance 11/03/2003 08:55 PM
It used to be that only high-end companies such as Apple or Sony cared about industrial design -- the distinctive look and feel of their products. But in an age when hardware has become a commodity, many more tech companies are coming to realize that aesthetics matter. By Dean Takahashi (San Jose Mercury News via MyAppleMenu)

Adding Drop Shadows with PHP


Adding Drop Shadows with PHP 02/01/2005 09:03 PM
This tutorial will teach you how you can add drop shadows dynamically to your images using PHP's GD image processing functions.

Adding a Default Printer


Adding a Default Printer 06/05/2004 01:09 AM

Adding rel="nofollow" to MoinMoin


Adding rel="nofollow" to MoinMoin 02/01/2005 09:27 PM
--- MoinMoin/formatter/text_html.old 2004-02-10 16:01:55.000000000 -0500 +++ MoinMoin/formatter/text_html.py 2005-01-18 21:29:10.000000000 -0500 @@ -90,6 +90,7 @@ # create link str = '<a' if css: str = '%s class="%s"' % (str, css) + if css and css=="external": str += ' rel="nofollow"' if title: str = '%s title="%s"' % (str, title) str = '%s href="%s">%s</a>' % (str, wikiutil.escape(url, 1), text)

Adding Bluetooth to MP3 players


Adding Bluetooth to MP3 players 10/31/2003 11:40 AM
A company called Infinite Range is working on a special Bluetooth add-on for MP3 players called RangeScan that'll let you wirelessly transmit audio to a stereo. The only problem is that right now all it does is take the analog audio signal from the players headphones jack, convert into a digital stream, and then decode them back into an analog signal at the receiver, which makes something like this only slightly more useful than an FM transmitter add-on like the iTrip. There are definitely some practical uses for having wireless networking built-into an MP3 player -- like swapping files with friends or wirelessly synching with a computer -- but Bluetooth is too slow to be off much use for those purposes. What we want Apple to do is to put AirPort Extreme into the next iPod. Read...
Grok Description matches for Adding & Changing Data in MySQL
GrokA matches for Adding & Changing Data in MySQL

New MySQL Front End: SQLyog v2.51


New MySQL Front End: SQLyog v2.51 11/21/2002 02:09 PM
A great new Front-End for MySQL has been released, SQLyog v2.51! Check this awesome software out!

Analyze MySQL databases with SQLyog


Analyze MySQL databases with SQLyog 12/27/2002 02:06 AM
CNET Dec 27 2002 1:03AM ET

SQLyog 2.51 - the definitve FREE MySQL
Front-End


SQLyog 2.51 - the definitve FREE MySQL
Front-End
11/18/2002 12:48 AM
SQLyog is a superfast, compact and easy to use Front End for MySQL. A must for PHP developers.

Changing Windows Explorer Column Widths


Changing Windows Explorer Column Widths 08/28/2004 06:29 PM

St Peter's Square - The Pope is dead -
People mourning the Pope at Saint Peters
Square Rome - QTVR photos from
panoramas.dk


St Peter's Square - The Pope is dead -
People mourning the Pope at Saint Peters
Square Rome - QTVR photos from
panoramas.dk
04/05/2005 04:07 AM
St Peter's Square - The Pope is dead - People mourning the Pope at Saint Peters Square Rome .. The Coolest Thing On the Web .. Panoramic view .. panorama

panoramas.dk/fullscreen5/f14a-pope.html
track this site | 9 links


SQLyog v3.62


SQLyog v3.62 11/11/2003 01:11 AM
Superfast and compact Win32 Front End for MySQL. Execute multiple queries, export data in CSV, HTML & XML. Import from textfile. Export data and schema itself. Flush hosts/logs etc. Diagnose your databases and much more [Shareware $49.00 2.18 MB]

SQLYog v3.0 Released!


SQLYog v3.0 Released! 02/02/2003 12:42 PM
This outstanding SQL management utility enters a new phase. WebYog is pleased to announce the new version of SQLYog. Get it while it's hot!

PHPFreaks.com Breaking News: SQLyog 3.61
arrives!


PHPFreaks.com Breaking News: SQLyog 3.61
arrives!
10/28/2003 11:06 PM
SQLyog is an easy to use, compact and very fast graphical tool to manage your MySQL database anywhere in the world. SQLyog 3.61 is now available, and you can download it and purchase a license from phpfreaks.com!

Square One TV


Square One TV 06/06/2004 01:48 AM
I always hated math, but I loved Square One Television.

Chips: It's hip to be square


Chips: It's hip to be square 12/02/2003 12:15 PM
USA Today Dec 2 2003 10:51AM ET

Square Sea Icons 1.0


Square Sea Icons 1.0 03/08/2004 11:26 PM
The sea in a square. Icons by Moocows In the Shed.

Poker Square 1.0.0


Poker Square 1.0.0 09/02/2004 05:19 PM
A mentally stimulating game, based on Poker hands, that requires concentration and skill, with a degree of luck.

Square Feet


Square Feet 01/19/2004 03:56 AM
[This is part of a series of posts on the home buying process I'm going thru. To see the full set, visit the house category archives.] After the place I saw the other day, I got to wondering how big my apartment really is. The place I saw was in the 1,500 square feet ballpark and just didn't feel very big. It seemed that I had quite a bit more room in my old 1,400 square foot house back in...

Red Tape from Red Square


Red Tape from Red Square 12/18/2003 03:35 PM
Red Tape from Red Square. Russian and Soviet cartoons. An interesting collection, despite a couple of broken images.

Square Hair


Square Hair 08/27/2004 02:07 PM
Somehow I had the idea that there was a certain air of being hip and with-it about this whole blogging thang. But look at the official Republican Convention designates: you can get a good gig and still be a honkey suit with Fifties hair. Who knew? (Actually, scroll down a bit, they have some real people too.)

Microsoft, EU square off


Microsoft, EU square off 11/12/2003 01:14 PM
ZDNet Nov 12 2003 10:53AM ET

The Square Wheel


The Square Wheel 10/30/2003 11:49 PM

"347 square feet?"


"347 square feet?" 07/07/2004 09:30 AM

Ryder Cup rivals square up


Ryder Cup rivals square up 09/17/2004 02:54 AM
Europe and America square up in the 35th Ryder Cup which gets under way on Friday.

Hakaniemi Market Square


Hakaniemi Market Square 03/06/2004 01:55 AM

Hakaniemi

Hakaniemi Market square and the tram station next to it. I love the old markets and really hope they resist being replaced with some concrete and glass modern atrocity.


Revolution Square, Bucharest


Revolution Square, Bucharest 06/12/2004 06:37 PM
Sheila: Revolution Square, Bucharest.

X-Wing in Times Square


X-Wing in Times Square 03/29/2005 01:56 PM

xwing_tsq.jpgWe don't know why, exactly (an M&M's promotion, we heard), but there's an X-Wing in Times Square. I might dork out and try to take a picture with me in the frame, but I'm not sure the train is running to Hatchi Toshi Station. Something about some power converters.

I mean 'do.' There is no try. (Thanks Catherine Punk for the photo and Dave for the heads-up.)


Now, Can You Find Its Square Root?


Now, Can You Find Its Square Root? 03/28/2005 11:20 PM
An eye surgeon in Germany has discovered the world's largest known prime number — or at least his computer did.

Adding & Changing Data in MySQL

The following phrases have been identified by the grok system as matching this entry: changing tmp mysql sqlyog last column has square csv

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Content Architect/IT
Analyst

Perl Application
Developer

Perl IS developer
Intermediate
Developer for an
online market
research company

Senior Perl
Developer wanted in
MN!!

OO CGI/mod_perl
developer

Immediate
Opportunities for
E-Commerce &
Transaction
Processing Co.

Perl / Mason
Application
Architect

PHP and Apache 2.0
PHP Class 'My Query
Report' released

PHP Class 'Email
Sender' released

PHP Class 'MySQL
Operations' released

Implement Bayesian
inference using PHP,
Part 1

PHP Class 'Browse
Edit' released

PHP Class 'Image to
PHP' released

PHP Class 'reGlobal'
released

PHP Class 'gonxtabs'
released

PHP Class 'PHP
Figlet' released

PHP Class 'MySQL
Backup Pro' released

Aqsis Renderer
release 0.9.1
Source, Windows
binary, RPM

PHP Class 'ADSI
Access' released

Switches look to
security to
recapture lost
luster

Tech group urges
action on health
care mandates

Sun kills UltraSparc
V, Gemini chips

Microsoft reins in
Longhorn for 2006
launch

Accounting questions
delay Salesforce IPO

Lindows to Change
Name

BugMeNot.com
Speed Sensing
Traffic Light

Smooth As Silk on
Square Wheels

Happy Birthday,
Internet!

The Exploratorium
System/360 Turns 40
Real Life X-Files
Early Usenet Posts
See the Ether
To the Moon!
Electronic Data
Coverage Insurance

The Endless Mountain
Life With Fedora
Field
FrooglePEG
I'm paying for what
now?

Time to hit the
streets

Think globally
Corpses not Corsets?
Key to wealth in
Medium Density
Fiberboard, not
motherboards

John, Paul, Ringo,
and Hetfield

Tools for
future-proofing MT

Guh?
what is grok?