Hello,
I'm having a problem when trying to update a record. I'm trying to set a
field called 'balance' to 0 but instead of 'balance' becoming 0 the
field 'name' becomes 0. None of the other columns are updated
incorrectly.
Here's the SQL statement I'm using:
UPDATE `users`
SET `name` = 'First
On Tuesday, April 24, 2007 10:12 AM Jim Winstead mailto:[EMAIL PROTECTED]
said:
AND `type` = 0
AND `manager_id` = 0
AND `modified` = NOW()
WHERE `id` = 5
you can't use 'AND' to connect your updates, you need to use commas:
UPDATE users SET name = 'First Last', email =
Anyone have any info
on MySQL Workbench? In it's latest state it isn't usable at all. It looks like
it'll be really great.
Thanks,
Chris ParkerAardvark
Tactical, Inc.IT Manager1002 W
Tenth St. Azusa, CA 91702phone: 800.997.3773 x130 fax:
626.334.6860[EMAIL PROTECTED]
Hello,
Originally I had this long explanation of what I'm doing and why I'm
asking this question but I thought I'd just cut to the chase and ask...
For a db that doesn't get a lot queries is there much of a performance
difference between BLOB and VARCHAR(255)?
Thanks,
Chris.
--
MySQL General
Hello,
I'm not sure if this is possible (or what it's called, and how to search
for it) at the db layer or if this has to be done at the application
layer... I would like to be able to delete one record in one table and
then automatically (without making an extra call to the db) delete other
Chris mailto:[EMAIL PROTECTED]
on Monday, August 07, 2006 6:19 PM said:
Foreign keys with an on delete cascade should do it.
http://dev.mysql.com/doc/refman/5.1/en/example-foreign-keys.html
Thanks everyone!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Hello,
Me again. Excuse for sending two questions so closely together.
I'm looking through the MySQL manual (as well as searching Google and
the PHP site's MySQL functions) trying to find out how to test an Insert
statement (or any other statement for that matter).
Although I haven't found a
Hello,
I searched the archives, looked through the manual, and searched google
for info on how to actually perform a multi-row INSERT but didn't find
an answer.
Would someone please show me the syntax for this please?
I could just do a loop and INSERT the data that way but according to the
John McCaskey mailto:[EMAIL PROTECTED]
on Thursday, March 31, 2005 12:04 PM said:
This is documented on the INSERT Syntax page of the manual, but it may
be kind of hard to read for a beginner as it just says VALUES({expr |
DEFAULT},...),(...),...
Oooh... In fact I did look through those
Homam S.A. mailto:[EMAIL PROTECTED]
on Wednesday, March 09, 2005 5:09 PM said:
If your tables are mostly read-only, you could
pre-generate page numbers on a periodic basis and
select only specific ranges WHERE row_number BETWEEN
page_start AND page_finish.
How about just getting the
John mailto:[EMAIL PROTECTED]
on Wednesday, November 10, 2004 10:04 PM said:
I want to make a small simple database that searches
by state or zip code for jobs. I would enter just a
job description, job position and job id #. so 3
fields display. I want to enter in the information by
an
Razor Fish mailto:[EMAIL PROTECTED]
on Thursday, October 21, 2004 3:19 PM said:
i need consulting help for optimizing a database with
1.2 million records to handle 3-4 million hits a day.
this is going to be a 'duh' question on my part but i just had to ask
anyway.
my largest table
Shanta McBain mailto:[EMAIL PROTECTED]
on Wednesday, October 20, 2004 9:29 AM said:
[% FOREACH link = DBI.query(SELECT * FROM url_tb
WHERE products LIKE 'honey'
AND (site_name = 'Apis' OR
site_name = 'All')
Robert Adkins mailto:[EMAIL PROTECTED]
on Friday, October 15, 2004 12:23 PM said:
INV_DATE DATETIME DEFAULT NOW() NOT NULL,
);
I receive an error message stating that there is an error with
'NOW()'
[snip]
Is there a very different method of doing this
leegold mailto:[EMAIL PROTECTED]
on Friday, October 15, 2004 2:32 PM said:
I do fulltext search on work. And AFAIK the search will not find
work. For that matter the seach will not find ingm. How do I
implement in MYSQL/PHP a search that will have this action?
please share the current
John Mistler mailto:[EMAIL PROTECTED]
on Friday, October 15, 2004 3:17 PM said:
Is there a function that will return the latest date from a datetime
column?
SELECT theColumn
FROM theTable
ORDER BY theColumn ASC (or is it DESC?)
LIMIT 1;
something like this? (or maybe this is too simple
Justin Smith mailto:[EMAIL PROTECTED]
on Tuesday, October 12, 2004 8:48 AM said:
What you have so far looks good, but what I learned from doing my
ecomm project was that it is beneficial to make a separate table for
anything and everything that you might have more than one of...
hello,
continuing my quest to build a better database, i'd like to ask a
question that i haven't been able to find an answer to. here is an
excerpt from an article on evolt
(http://www.evolt.org/article/Beginning_Database_Design_Part_I/18/27137/
): (and where i got the idea as well)
You'll
hello,
i'm just looking for some examples of a customer table that some of you
are using for your ecomm sites (or any site that would need a customer
table).
here is mine so far:
(horrible wrapping to follow...)
mysql describe customers;
Dan Venturini mailto:[EMAIL PROTECTED]
on Friday, October 08, 2004 11:51 AM said:
Now If I do a search for cleaning mouse I get 0 results. If I do
cleaning computer' I get 0 results. But If I do mouse cleaning,
mouse, cleaning your,I get the articles.
[snip]
My question is am I doing
Michele mailto:[EMAIL PROTECTED]
on Friday, October 08, 2004 3:23 PM said:
2) I'm looking for id_product that can contemporaneously satisfy more
than an id_value (NOT ONLY ONE!!)
contemporaneously? that's got be one of the best made up wor... wait
what? you mean it's a real word?
Michele mailto:[EMAIL PROTECTED]
on Friday, October 08, 2004 4:57 PM said:
Have I well understood the meaning of your answer ?
It was meant as a joke and not a serious response to your question. I
apologize for the confusion.
Chris.
--
MySQL General Mailing List
For list archives:
hello,
i was wondering if anyone could help me to optimize a query i use when
gathering search results? this is easily the most complicated query i've
written (and likely a walk in the park for most of you) and because of
this, i'm afraid it's a bit slow.
SELECT COUNT(p.id)
FROM products AS
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Thursday, October 07, 2004 12:30 PM said:
You set up your situation very well but for one small item. Please
allow me to kindly introduce you to the EXPLAIN command
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html
hey! that looks like it
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Thursday, October 07, 2004 1:34 PM said:
Can you see where the column possible_keys is NULL for every table?
That means that there are NO (none, zilch, nada, zero) indexes that
can be used to save your database engine from the trouble of doing
Sanjay Arora mailto:[EMAIL PROTECTED]
on Wednesday, July 07, 2004 10:04 AM said:
I am using Mysql on RH Linux 9. I am getting the following error.
[snip]
Database changed
mysql GRANT ALL PRIVILEGES ON dns.* TO [EMAIL PROTECTED] IDENTIFIED BY
PASSWORD dns;
ERROR 1133: Password hash
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, July 07, 2004 11:08 AM said:
Have you tried this other way of making an inner join?
no i did not because i did know you could do a JOIN on an UPDATE. thanks
for your suggestions i will try them out.
chris.
--
MySQL General Mailing
hello,
i've had to change some of the tables in my db to accomodate some
greater flexibility in the application that uses it and because of this
i need to go through and update all the records. i've done one table by
hand and it had about 100 records and took about 20 minutes. but this
next table
Kevin Carlson mailto:[EMAIL PROTECTED]
on Thursday, October 30, 2003 2:38 PM said:
Yes, the transaction was committed. I was using MyCC at the same time
the anomaly occurred, also. Could this have had anything to do with
it?
What was the star date of said anomaly?
TEEHEE!
Chris.
--
Matt W mailto:[EMAIL PROTECTED]
on Monday, October 27, 2003 5:29 PM said:
As to why mysqldump would create a dump file with a syntax error in
it, that's because *you* (or the application creator) used a reserved
word for a column/index name (bad idea) and mysqldump
I always try to be
Andy Bakun mailto:[EMAIL PROTECTED]
on Wednesday, October 29, 2003 12:27 PM said:
It may be best to always use the --quote-names option to mysqldump,
which would avoid any problems you might encounter with reserved words
being used in column and table names.
Already done. :)
Chris.
--
Hey everyone,
First post to the MySQL list so please be gentle.
I recently emptied some tables I shouldn't have in a db of mine and I
want to restore the data from a dump file made a few days ago.
MySQL version is 3.23.
This is the command I used to create the dump:
mysqldump --opt -u root
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Monday, October 27, 2003 10:52 AM said:
can you send the contents of your dumpfile up to this point.
assuming its line 118 of hte dumpfile and 21 of this build table query
Line 118 is the beginning of the 'customers' table definition and line
Dathan Vance Pattishall mailto:[EMAIL PROTECTED]
on Monday, October 27, 2003 11:28 AM said:
Try changing the keyname unique to email.
UNIQUE KEY email (email)
Thanks, this worked.
I ended up having to change two more instances of the same error in
different tables.
Why would the
34 matches
Mail list logo