add secs to datetime

2002-01-07 Thread Kodrik
I have datetime and I want to add a number or seconds to it. That number can be greater than 60, it can actually be greater than the equivalent of a years in seconds. How do I add these seconds to the value of a datetime field through an update with MySQL?

Re: add secs to datetime

2002-01-07 Thread Kodrik
On Monday 07 January 2002 01:13 am, Roger Baklund wrote: * Kodrik I have datetime and I want to add a number or seconds to it. That number can be greater than 60, it can actually be greater than the equivalent of a years in seconds. How do I add these seconds to the value

Re: not in -- not exists

2001-12-13 Thread Kodrik
Dear all can anyone help me to use NOT IN or NOT EXISTS command in mysql .. You need to use left join the table and look for an inexisting link select * from table 1 left join table2 on table2.key1=table1.id where whatever and table2.id is null

Re: not in -- not exists

2001-12-13 Thread Kodrik
Dear all can anyone help me to use NOT IN or NOT EXISTS command in mysql .. You need to use left join the table and look for an inexisting link select * from table 1 left join table2 on table2.key1=table1.id where whatever and table2.id is null

Re: Should I give on Linux and go back to Microsoft???

2001-12-10 Thread Kodrik
If you are a beginner and are using red hat why don't use the mysql rpms. It does everything for you. When you compile php, be sure you have the right path for mysql (I think that is your error in this case). Finally, be sure you entered the user right for the connection, with the host

Re: Random

2001-12-08 Thread Kodrik
Try (select field 1, field2, field3, rand() as rnd where blah blah blah order by rnd limit 1) On Saturday 08 December 2001 10:35 am, [EMAIL PROTECTED] wrote: Hi, I am trying to pull up one random name in mysql 3.22.21 but not having much luck. Here is what I have done:

Re: help with timestamp...

2001-12-04 Thread Kodrik
At 11:25 PM 12/4/01 -0700, *Himerus* wrote: Can anyone give me a good link on how to put in a timestamp on a form that inserts directly into a sql database??? I keep trying it, but it's only coming thru as 00 , so on. I enter my timestamp as a unix timestamp in an INT field. I

Re: Selecting boundary dates for a given week using date/time functions?

2001-11-25 Thread Kodrik
Well, whatever language you are using to output your data, there should be some unix tampstamp converting function. In php it's date(). On Sunday 25 November 2001 04:20 pm, Chris Cooper wrote: Hey all, I'm hoping someone can help me out with a little date/time problem I'm having. I've got a

Re: time_format();

2001-11-20 Thread Kodrik
I find the easiest is to use a unix timestamp in your db (int), then use the date() php function to format the display as your please. On Tuesday 20 November 2001 04:29 pm, Joel Wickard wrote: Hello all. I'm developing a web-based app with php / mysql. I'm interested in hearing peoples

Re: MySQL has transactions, foreign keys, and an option for NO DEFAULT

2001-11-10 Thread Kodrik
That is all good :) I'm mostly aware of the possibilities I had offered to me the last time I set up my developing environmenta and the db design decision I had to make accordingly. I guess in less then a year, when 4.x will have some good mileage, I'll set myself a new developing environment

Re: Default forced on MySQL

2001-11-10 Thread Kodrik
I would like to add my support for NO DEFAULT. The lack of this feature is by far the worst thing about MySQL. I don't get this argument. What happens when a unique index is violated? Isn't this the same problem? Those two comments together are quite interesting. Can you enlighten me with

Re: Default forced on MySQL

2001-11-10 Thread Kodrik
On Saturday 10 November 2001 01:00 pm, you wrote: Kodrik wrote: Understand also that the check for a uniq index has to be made by a call to the DB so it makes sense the DB does it, but a check on the content of a variable can be made by one line of code without any call to the db

Re: Beginner question - getting last inserted ID

2001-11-09 Thread Kodrik
The manual has all the necessary information: http://www.mysql.com/doc/C/R/CREATE_TABLE.html http://www.mysql.com/doc/e/x/example-AUTO_INCREMENT.html The unofficial FAQ has a chapter on AUTO_INCREMENT: http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0_0 What you're looking for is probably

Re: Keeping SQL dbs separated

2001-11-09 Thread Kodrik
The guy passed this request to the hosting company (which he doesn't want to change) and the answer is: if you *really* need to use PHP instead of ASP OK, but as far as MySQL is concerned we only have one customer using it now, and if we gave it to you too, then the two databases would be

Re: OT: Default forced on MySQL;

2001-11-09 Thread Kodrik
No kidding? Why don't you fork the PostGreSQL codebase and apply your special assembly talents to speed it up by 50% or even 60%? If you're willing to pay for quality, Oracle is an obvious choice. It's fast, it has all the features, there are numerous advanced tools to manage and develop your

Re: lost in the Land of Oz Parking Lot (I hope this message makes it through!)

2001-11-08 Thread Kodrik
I think there is a package on Window called PHPtriad that installs Apache/MySQL/PHP all configured and everything for normal users (your case at this level). You should be able to find it trough download.com. On Thursday 08 November 2001 04:26 pm, [EMAIL PROTECTED] wrote: Dear Noble X:

Re: Update MYSQL command with PHP

2001-11-08 Thread Kodrik
$query1 = UPDATE Qusers SET $field_str WHERE UserName='$username'; $result2 = mysql_query($query1); It should be: update Qusers set field_name='$field_str' where username='$username'; - Before posting, please check:

Re: performance of joins

2001-11-03 Thread Kodrik
Well, you usualy split your data in tables for a reason, because some data in mulitple numbers are associated to one, or multiple data. In your case, if you have one address and contact per customers, then make it one table. If you have an unknown numer of contacts and numbers per customer,

Zork!

2001-10-26 Thread Kodrik
I wrote a php pipe that allows people to play Zork from their browser http://phpzork.com Zork is a 20 years old command based adventure games. One of the first and most popular. It's source code was released. Many of us here should remember it. For those who don't know how to play, just type

Re: Formatting Large amounts of Text into Mysql

2001-10-24 Thread Kodrik
I use this function to cleanup my text. It converts any weird characters that may cause problems when outputting to html with php. It also converts end of line to br or br / depending on your version of php function cleanup($copy) { $copy=trim($copy); $copy=htmlspecialchars($copy, 

Re: select stmt problem

2001-10-24 Thread Kodrik
for one, counts is not a colums, it aggreate values. In your case, since you didn't group, all record retrieved will have the same value for count(*), the number of record. So of course you can't order by counts, it's a single value. On Wednesday 24 October 2001 02:43 am, Carl Troein wrote:

Re: Pictures in mysql

2001-10-24 Thread Kodrik
You should just enter the path to the picture in the database, in a varchar field. On Wednesday 24 October 2001 08:09 am, [EMAIL PROTECTED] wrote: Hello friends. I am a newbie in mysql and web programming. Can someone please tell me where I can find some info on putting pictures into

Re: select stmt problem

2001-10-24 Thread Kodrik
On Wednesday 24 October 2001 05:43 am, you wrote: I did the grouping too... ...group by hpnumber so what could be wrong? select hpnumber,count(*) as counts from Mobile_Ringtone_Manialogs where counts 10 and datesent between '2001-09-24' and '2001-10-24' and (returncode 0 and

Re: looping

2001-10-24 Thread Kodrik
You can't at this point. But anyway, it is usually better to make your application do the work than your database. MySQL doesn't process functions faster than you would with arrays (which is what it would have to do ) and it's better to take as much load off from your database. Even if you

Re: Automatic Mathmatical Computation

2001-10-24 Thread Kodrik
Yes, you can do: update whatever set C=A*B+3 where whatever On Wednesday 24 October 2001 07:11 pm, [EMAIL PROTECTED] wrote: Hello, I am wondering if there is a way to make automatic computations into a particular column, for instance: Table ONE has column's A, B and C. When I post data

Fwd: Re: finding the range of results?

2001-10-20 Thread Kodrik
How do you find what position a value is in a larger query's result? Well, if you put some sorting to your search, you will know the position of your item by the count of the loop you are using to extract the data. You use limit to return a max number of items, and keep a tab of where your