1st, you should limit the permissions that you have for the user doing
the update.
This user should not be able to do things like ALTER / DROP / CREATE
etc...
If you don't have a need for the DELETE command you can remove the
permissions for it to, however this does not solve all of your problems
or :
$sql="INSERT INTO table (date) VALUES (now())";
-Original Message-
From: Jim Lucas [php] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 2:11 AM
To: [EMAIL PROTECTED]; Matthew Crouch
Subject: Re: [PHP-DB] easy date format question
$today = date("Ymd");
$sql = "INSERT int
Dear all,
How do I dynamically calculate how many working hours in a particular month?
Has anyone do it before?
Here is the simple formula.
Add - Number of days in a month
Deduct - Sundays
Number of Mon-Fri in a month * 8 hours
Number of Sat in a month * 4 hours
My Figure = total working hours o
Hi there:)
I use odbc so you'll have to change your functions if you're using mysql
//connect to db
$connectionToDB = odbc_connect("cdconsultant", "joecon", "joecon");
//create query statement
$sqlr = "SELECT DISTINCT category FROM CONSULTANT ORDER BY category" ;
//execute the sql statement (
Hi there,
I would like to querry my db for following result
- Count the number of topics listed in the table fo_topics,
but only the topics where the belonging forum is not in the archive mode
( this is when table fo_forums field archive is 1)
I tryed following querry but this is for sure wron
On Sat, Mar 02, 2002 at 05:36:41PM +0100, Andy wrote:
> Hi there,
>
> I would like to querry my db for following result
>
> - Count the number of topics listed in the table fo_topics,
> but only the topics where the belonging forum is not in the archive mode
> ( this is when table fo_forums fie
Well off the top I'd say your forgot the join condition between the
fo_topics and the fo_forums tables. Right now you're counting the Cartesian
product of the two tables.
Also you can't select an aggregate function (like count) and regular columns
without a group by on the same columns.
F
on 3
Instead of just closing the window try this :
Echo"opener.location.reload();
window.close(); ";
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-Original Message-
From: Shahmat Dahlan [mailto:[EMAIL PROTECTED]]
Sent: Thursday,
Ken,
Check out DAYOFMONTH() and MONTH() and a wealth of other useful date
functions. RTFM: 6.3.4 Date and Time Functions
The answer to your question about AUTO_INCREMENT 'reset' can be found at
6.5.3 CREATE TABLE Syntax under "table_options".
Regards,
=dn
> I have a test table with the ususal
hey folks,
I just got done writing a function to help with my data cleaning. It works -
actually a lot better than I thought it would - but I am sure there are ways
I could optimize this somewhat. The function takes two result sets (usually
first name, last name, city, state, zip) from two tables
I just ran across this description[1] that points to this link[2]. HAven't
tried it personally, and the site requires a login, so you might not find it
useful, but just in case.
[1]Count how many weeks in the month have a specified day, such as Mon, Tue,
etc. Var avail - number of days - first d
I have the thing returning the date as long as the date format is "m/d" in
the table with a seperate year column.
Here's the table:
mysql> select * from Cinfo;
+-++--+---+---+
| Cid | Fname | Lname| Bday | Byear |
+-++--+---+---+
|
Ken,
If it works, it works!
If you want to store the birthdate in a single column in the db, then
make the datatype a date in CCYY-MM-DD format, then prepare the query by
asking PHP for the server's date as month (MM) and day (DD) and apply
those to the query using the functions I pointed you at
On Saturday 02 March 2002 16:13, DL Neil wrote:
> Ken,
>
> Check out DAYOFMONTH() and MONTH() and a wealth of other useful date
> functions. RTFM: 6.3.4 Date and Time Functions
There's a few interesting items here OK, Thanks for the pointer.
> The answer to your question about AUTO_INCREMENT 're
Hi there,
Thanks, the article was posted by me at that site.
I have a few different email addresses to a point I forgot which and which..
I have solved the problem. Here are the codes.
5
//
// Initial formula doesn't work well, so I "reversed-engineered" to get the
formula.
// 0 - Sunday,...,6
Hi all,
Can anyone point me to a good tutorial on how to disable a submit button
once clicked?
preferably in php.
Thanks
Jennifer Downey
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
16 matches
Mail list logo