On Sat, 2005-02-19 at 23:55, David Blomstrom wrote:
> > Why not set columns to NOT NULL and default to space
> > for character and 0
> > for numeric?
>
> OK, you're suggesting I...
>
> 1. Set all the columns to NOT NULL
> 2. Set 0 as the default for numeric fields
> 3. Set "space" for the defau
On Fri, 2004-09-24 at 21:31, Laszlo Thoth wrote:
> Here's the kids:
>
> mysql> SELECT p.name as parent,c.name as
> child,(TO_DAYS(NOW())-TO_DAYS(c.dob))/365 as age FROM people as p LEFT JOIN
> people as c ON p.name=c.parent WHERE c.name IS NOT NULL ORDER BY p.dob;
You seem to be missing a parent
On Fri, 2004-09-10 at 14:12, [EMAIL PROTECTED] wrote:
> According to the docs, this should work in versions past mySQL 4, and I seem
> to be running a version rather later than that
>
> mysql Ver 11.18 Distrib 3.23.52, for pc-linux (i686)
>
> What am I doing wrong here? I have two valid SELECT
use a simple OR statement. But,
> the information I really want is in which column that product id appears.
> Using PHP, I can simply grab the key from the array returned by the query.
> I was hoping MySQL offered this functionality; evidently, it does not.
I serious hope no one adds this "functionality" to MySQL, because it
would only serve to encourage questionable database design.
--
Andy Bakun <[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
is is because you were missing a quote that closes a
string.
--
Andy Bakun: a killer headache
<[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
e of these two columns is zero. Simplified, your query ends up
being (after the expressions are evaluated):
insert into table (username, password) values (0, 0)
because both of the expressions you put in the values evaluate to 0.
I hope this is clear enough.
--
Andy Bakun <[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
;t have hard numbers. Your best
bet would be to test performance yourself. Be sure you are using an
index on that column in your query (verify that with explain) -- using
an index will make the most difference, of course.
--
Andy Bakun: get used to it
<[EMAIL PROTECTED]>
On Fri, 2004-01-09 at 05:14, Chris Nolan wrote:
> On Fri, 2004-01-09 at 20:58, Andy Bakun wrote:
> > On Thu, 2004-01-08 at 05:24, Chris Nolan wrote:
> >
> > > 3. Wait for a while. Linux 2.6 includes (as does the RedHat 9.0 and
> > > ES/WS/AS 3.0 kernels) NPTL - t
es to NPTL I can find via google
as it relates to changes in 2.6 talk about how 2.6 has additional
clone() options that NPTL takes advantage of (most of them reference a
text that is available at http://kerneltrap.org/node/view/422). Also,
why are you down on clone() -- I trust you, but I wan
want to use an industry standard threading model?
--
Andy Bakun <[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
the pseudo-code I've provided above to
a function that formats a query for you if you give it all the data
values and the lengths of the input buffers and whatnot (thereby making
it work somewhat more like the prepared statement support in 4.1).
(BTW, you should get in the habit of using snprintf rather than sprintf,
if your platform supports it, in order to avoid buffer overruns).
--
Andy Bakun <[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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.
--
Andy Bakun: when uselessness just isn't enough
<[EMAIL PROTECTED]>
--
MySQL General Mailing List
For list arch
On Wed, 2002-12-11 at 04:44, Tom Roos wrote:
> hi
>
> i want to build a query in which i have 2 datetime fields which i subtract
> from one another. what is the result set? is it in (milli)seconds, is it a
> unix timestamp? what type of convertion do i have to apply to report the
> difference i
Look up SUBSTRING_INDEX in the mysql manual.
select SUBSTRING_INDEX(colX,' ',-1) from table
is what I think you want. This will return everything after the first
space found. May want to stick an if(...) construct in there for where
you don't want the rows without the spaces (see below).
Then
On Mon, 2002-12-09 at 16:10, Beauford.2003 wrote:
> Andy,
>
> I mentioned in my previous email that I am using PHP, and I have also tried
> putting quotes around $var (many different ways) with no better results.
> REGEXP just gives a syntax error when I do this.
I'm sorry, I did miss the where y
You still have not mentioned what language you are using to interface
with MySQL. If you are using PHP or Perl, then things like single and
double quotes will make a difference here, and looking in the MySQL
manual will not help you. Check the string that contains the query, if
it looks like this
I have successfully configured two mysql instances to replicate to each
other (According to /doc/en/Replication_Features.html, it is possible to
do it in a A->B->C->A relationship, but I only did it with two servers
and I don't have log-slave-updates on (I think if I did, it would
immediately stop
I have successfully configured two mysql instances to replicate to each
other (According to /doc/en/Replication_Features.html, it is possible to
do it in a A->B->C->A relationship, but I only did it with two servers
and I don't have log-slave-updates on (I think if I did, it would
immediately stop
I don't know about "incorrect", but confusing, sure. It is easy to
predict what is going to be returned based on the documentation.
On Thu, 2002-11-21 at 14:19, Joe Siegrist wrote:
> I don't agree that mysql is 'right' here though, I realize that if you
> simply strip out the year for the date i
On Thu, 2002-11-21 at 09:47, Johannes Ullrich wrote:
> And more difficult, try to look at your application design and try
> to come up with 'cache tables' that are generated by a cron job
> periodically and are used for most queries.
This is an excellent suggestion and may make you think about yo
20 matches
Mail list logo