Bruce, looks like you're missing join criteria, and so you're
selecting a Cartesian product into your trgtTBL ... this this on for
size:
replace into trgtTBL (cat, dog)
select t.cat, t.dog
from fromTBL t, trgtTBL
where trgtTBL.valid = 0
AND t.cat = trgtTBL.cat AND
I know you asked for PHP, but you might look into Ruby on Rails. 'scaffold'
can make a whole lot of stuff like that almost trivial...
http://www.rubyonrails.org/
DÆVID
> -Original Message-
> From: thomas Armstrong [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 11, 2006 4:02 AM
> To:
hi...
i've got an issue that i can't figure out... i'm trying to do a replace,
where i only replace information from one tbl, into the targeted tbl, if the
targeted tbl 'valid' item = 0;
if the tbls are:
fromTBL
cat
dog
mouse
tgtTBL
cat
dog
mouse
valid
data from external app (fr
The reason for this is probably because the original poster inherited
a database without a primary key, and now needs to make edits to it.
That happened to me with Oracle once, and I was lucky enough to be
able to use Oracle's rowid, which is a unique reference to the row
that is independent of th
Hi,
I recently updated to version 4.1.2 from a slightly
older one like 4.1.11 or something. But I am now having
a problem.
Before,this query would work fine:
Select distinctrow * from mytable order by
mydatecolumn.
mydatecolumn is a column of type date.
This used to return the records
--On August 11, 2006 2:44:34 PM -0400 Ed Pauley II <[EMAIL PROTECTED]>
wrote:
It seems like I once read that you don't get any performance gains in
MySQL when you go above 4 CPUs per server. Is this correct? I was
considering a 4 dual-core CPU machine. Should I go with a 2 dual-core
machine
From the articles I've read recently, 8 CPU's seems to be the point
where the scalability ratio starts dropping. See the following articles
for examples:
http://developers.sun.com/solaris/articles/mysql_perf_tune.html
http://corporateclub.mandriva.com/xwiki/bin/download/Main/Technology/mysql-per
Ed, I don't recall that being an issue, though you will likely need to
tweak the values of your my.cnf file (thread_concurrency for example)
to ensure you're taking advantage of all the cores.
This is highly dependent on your situation - but as you increase
number of CPUs, where you may start to
At 7:05 pm +0200 11/8/06, Paul McCullagh wrote:
>Not so readable, I agree, but great when you want to find all references to a
>particular database column in 1000s of lines of code!
Personally that's not something I've found myself wanting to do, but I can see
some people may need to do that.
I
It seems like I once read that you don't get any performance gains in
MySQL when you go above 4 CPUs per server. Is this correct? I was
considering a 4 dual-core CPU machine. Should I go with a 2 dual-core
machine instead?
Thanks!
--
Ed Pauley II
--
MySQL General Mailing List
For list arch
Well that's a different question! ;)
Given a set of values, iterating through and updating the values in
the original table would also work fine, eliminating the use of a temp
table. As to whether that's more efficient - hard to say. Will
depend on the size and structure of your original table
thanks for the reply dan...
but is there a better/more efficent way...>
thanks
-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Friday, August 11, 2006 8:13 AM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: replace/temp tbl question...
Bruce, see
On Aug 11, 2006, at 6:00 PM, James Harvard wrote:
FWIW a couple of weeks ago I read of a good reason not to use
uppercase letters in table column names. I can't remember what it was
now, but it seemed like sense at the time! My personal preference is
to always use lowercase and separate any w
On Fri, 11 Aug 2006 15:02:12 +, Neil Tompkins wrote
> At the moment our mysql server hosted by an ISP, is updated every
> second by a program running on our local Internet connection from
> our own office network. We have seen no performance issues from our
> websites hosted by the same ISP
On Fri, 11 Aug 2006 17:00:35 +0100, James Harvard wrote
>
> need it with an underscore. Apart from that I agree with Douglas
> Sims that what is most readable is best.
>
> select user_email, user_address, user_postcode from users where
> user_id = %d;
> # Hmm
>
> select email, address, postcod
FWIW a couple of weeks ago I read of a good reason not to use uppercase letters
in table column names. I can't remember what it was now, but it seemed like
sense at the time! My personal preference is to always use lowercase and
separate any words that need it with an underscore. Apart from that
mark addison wrote:
On Fri, 2006-08-11 at 10:30 +0100, Jorge Martins wrote:
Hi,
I have a client that want's to store in a table the exact number that he
get's from a file, i've used a DOUBLE data type (MySQL 3.2x), but I have
the following problem:
If the number is for example 9.0 mysql
Thomas
>Is there any PHP script to create it automatically (in the same
way
>phpMyAdmin does, but
with less functionalities)?
Mebbe theUsual will be helpful
http://www.artfulsoftware.com/theusual.html, code at
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1_appe.html#theusual_php.
If it's a simple update, then it's doubful a once-a-second update
would cause any problems. Databases are built to handle exactly that
sort of work.
On 8/11/06, Neil Tompkins <[EMAIL PROTECTED]> wrote:
At the moment our mysql server hosted by an ISP, is updated every second by
a program runnin
Bruce, seems like this ought to work just fine.
Dan
On 8/11/06, bruce <[EMAIL PROTECTED]> wrote:
hi...
can someone tell me if this should work in theory...
basically, i'm looking to get a bunch of rows from my initial table, based
on the value of a given column/field. i'd then like to do a co
At the moment our mysql server hosted by an ISP, is updated every second by a
program running on our local Internet connection from our own office network.
We have seen no performance issues from our websites hosted by the same ISP
running our mySQL server.
My question is because of this remo
On Fri, 2006-08-11 at 10:30 +0100, Jorge Martins wrote:
> Hi,
>
> I have a client that want's to store in a table the exact number that he
> get's from a file, i've used a DOUBLE data type (MySQL 3.2x), but I have
> the following problem:
>
> If the number is for example 9.0 mysql truncates and
Hi,
> REPLACE is a special INSERT/UPDATE combination where you
> dont specify a filter, it uses the primary key. If no existing record
> exists, it INSERTs a new one, otherwise it UPDATEs an existing one.
Just a quick note - REPLACE does not do any UPDATE. It is a
combination of DELETE (if t
Hi,
I upgraded one slave server from 4.0.23 to 5.0.24, and when I run
mysql_upgrade I got the following error :
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
what can I do ?
--
http://www.w-fenec.org/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mys
Unfortunately i think you ought to use a varchar string, i read from the
mysql manual and do not found a numeric type that can have different
decimals number on each register.
"Jorge Martins" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi,
>
> I have a client that want's t
REPLACE is a special INSERT/UPDATE combination where you dont specify a filter, it uses the primary key. If no existing record
exists, it INSERTs a new one, otherwise it UPDATEs an existing one.
What you are looking for is the UPDATE command.
- Original Message -
From: "bruce" <[EMAIL P
Barry wrote:
> Hello everyone!
>
> I am looking for a standard naming convention for databases.
>
> For example: is it good to use tablenames in column names like:
> table => tb_id,tb_text,tb_name
I've for a long time been using an uppercase notation for databases.
Probably isn't the best system
Hi.
I've got three tables (users, books and news), and I would like to
crete a web interface
to manage their data (create items, modify items, delete items).
Is there any PHP script to create it automatically (in the same way
phpMyAdmin does, but
with less functionalities)?
Thank you very much.
The example you give is a form of hungarian notation, wherein an
abbreviation representing the type of the variable is the first part
of the variable name. Hungarian notation is not generally considered
good practice for a variety of reasons; it is usually unnecessary, it
interferes with t
Hi,
I have a client that want's to store in a table the exact number that he
get's from a file, i've used a DOUBLE data type (MySQL 3.2x), but I have
the following problem:
If the number is for example 9.0 mysql truncates and only stores 9
I tried to use the (M,D) for example as (6,5) but th
Hello everyone!
I am looking for a standard naming convention for databases.
For example: is it good to use tablenames in column names like:
table => tb_id,tb_text,tb_name
and such.
Probably there is some kind of overall naming convention out there,
looked on google and such but only found co
Sounds like you will have to change the structure of your table. I would
add an auto-increment column at the beginning of the row and use that as
the primary key. You can still select on the horse, course etc. like so
SELECT * FROM horse_and_courses WHERE ORDER BY
new_primary_key DESC LIMIT 1;
T
I have a site with horse racing results and the results table consists of:
Date, Time, Course, Horse, Odds, Result, Profit
I have about 6 months results in there and obviously there are no unique
fields.
Each morning I imprt a new spreadsheet with the days racing selections
without the odds and r
On Friday 11 August 2006 08:25, [EMAIL PROTECTED] wrote:
> Can the output of the DESCRIBE be stored somewhere ( in file)?
mysql mydb 'describe table' > table.describe.txt ?
> Or is there any way to get the structure of whole table?
show create table?
--
Scanned by iCritical.
--
MySQL General
Can the output of the DESCRIBE be stored somewhere ( in file)?
You can store it where-ever you like. Mysql stores it in a binary file
which you can't read (ie it's not like the my.cnf file).
I suppose the DESCRIBE query doesn't return the result set.
What are you after exactly? Using 'ex
THANKS ALL for the tremendous response. It is really helping me a
lot
I have another query.
Can the output of the DESCRIBE be stored somewhere ( in file)?
I suppose the DESCRIBE query doesn't return the result set.
Or is there any way to get the structure of whole table?
Regards,
R
36 matches
Mail list logo