Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
Nabil
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nabil wrote:
Please help me how to print a timestamp string retrived from the database,
and print it as -MM-DD
use the mysql date_format fumction
DATE_FORMAT(date,format)
select date_format(date_field, '%Y-%m-%d') from data;
see the mysql docs for more details
--
Sean
--
PHP Database
hi,
I have problem with read file on my LAN.
if I read
echo readfile(c:\\200303.atu );
its work ok, but if I read
echo read(Billy\\income\\200303.atu);
its doesnt work
where is mistake?
can you help mi?
thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
I debugged the code and there were a slew of errors. I've fixed all but one,
which I can't correct bcs I don't know the intention. Most of the errors came
from improper syntax, a problem which could have been avoided by using
consistent code formatting. I chose to do that for you as well and
If you aren't a coder, you probably cannot do what you ask; there aren't
any pre-built simple systems that do exactly what you ask.
Yes and no. I agree that someone without coding experience (or a desire to
learn) cannot tackle this problem, but what Philippe has requested is a simple
user
-Original Message-
From: Earl [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 22:04
To: PHP-DB
FYI
this was beginning to bug me out... so I decided to try the
trim function
and walla... it worked.
Thanks for ya'll assistance.
I was going to say this even before you added
It's probably an issue with security settings in IE6, not your code.
Edward Dudlik
Becoming Digital
www.becomingdigital.com
- Original Message -
From: Marie Osypian [EMAIL PROTECTED]
To: PHP-DB [EMAIL PROTECTED]
Sent: Thursday, 05 June, 2003 11:30
Subject: RE: [PHP-DB] Cookie issue
My database is set up in this way:
fan_roster: has player id (play_id) , week, and stats on that player for
that week. So there are 20 records for each player, because there are 20
weeks.
So what I need to do is add up all the players weekly totals. so pass_yrd1
for week1 + pass_yrd1 for week2
It appears to me that you have REGISTER GLOBALS set to OFF. If that's the case,
you need to pre-pend each of your variables with $HTTP_POST_VARS or $_POST. If
you're not concerned about the security issues raised by leaving globals on,
simply change that one item in your php.ini file.
Edward
What's the purpose of your script? You can take a look at the command line
functions in the manual, though I don't know if they work in a Windows
environment.
Edward Dudlik
Becoming Digital
www.becomingdigital.com
- Original Message -
From: carol [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
I am stumbling across something that I thought I have done before,
and I am not having any luck finding an example of this. Basically, I am
wanting to timestamp the date and time into new entries in a simple database
table. The following section is the actual code for this, and I cannot
The error I am receiving is:
You have an error in your SQL syntax near ' NOW())' at line 1
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 1:45 PM
To: NIPP, SCOTT V (SBCSI)
Subject: Re: [PHP-DB] Datetime help in an INSERT...
On Friday 30 May 2003 23:11, Ovaltine wrote:
At some point you need to force users to upgrade.
In the case of javascript I don't think 'upgrade' is an issue here. The vast
majority of browsers are certainly capable of executing javascript, rather
the issue is the people who consciously choose
If you are using MySql with the date field is of type timestamp, you should
have to insert anything using the query. It will update automatically when
the record is inserted and/or updated.
ie; $denylog = INSERT INTO deny (account, td ) VALUES ($tmp, $td );
Randy
-Original Message-
Correction ( I typed this in a hurry ) ...
If you are using MySql and the date field is of type timestamp, you should
_not_
have to insert anything using the query. It will update automatically when
the record is inserted and/or updated.
ie; $denylog = INSERT INTO deny (account, td ) VALUES
No, the field is a Datetime field rather than a Timestamp field.
-Original Message-
From: Rankin, Randy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 1:59 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Datetime help in an INSERT...
Correction ( I typed this in a
I am stumbling across something that I thought I have done before,
and I am not having any luck finding an example of this. Basically, I
am
wanting to timestamp the date and time into new entries in a simple
database
table. The following section is the actual code for this, and I cannot
Hey guys, I've got a problem with this piece of code
it is skipping the contents of the if and elseif statements and only printing the else
values, even though the if or one of the elseif statements might be true.
what could possibly be the problem??
1. Change your field name from date to something like datefield (or backtick
it)
2. Place single quotes within your VALUES parens, e.g.
$denylog = INSERT INTO deny (account, td, datefield ) VALUES ('$tmp',
'$td', NOW() )
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
Pay
You don't have a closing bracket on your while() loop and you should not have
the else comments bracketed. Try this:
while($cols=ifx_fetch_row($eventQuery))
{
if (($cols['s_acro']=='CF') || ($cols[s_acro]=='PF'))
{
$r_away['sport']='1';
$r_home['sport']='1';
$s_lt='PS';
I think this is the real problem. Basically, the $td variable is
defined intially, but upon clicking a button the page reloads itself and I
believe that at this time it is losing the $td variable. I am not quite
sure how to prevent this from occurring. Thanks again for all the help so
2. Place single quotes within your VALUES parens, e.g.
If they are really strings. Integers or dates in a MMDD format do not
require quotes.
$denylog = INSERT INTO deny (account, td, datefield ) VALUES ('$tmp',
'$td', NOW() )
---John Holmes...
--
PHP Database Mailing List
Sorry about that I did not get the closing tag when i copied the code.
I did as you said and it still gave the same problem.
below is the complete code
$eventQuery=ifx_query('select * from event'
.' where e_date = today '
.' and e_status
I need to modify some company web pages that include a form for asking the
company departments questions, such as service dept, etc. As the forms are
currently built there is some field validation but no cookies. This info
is saved in a mysql database, problem is, there are duplicate entries,
The closing else is not bracketed.
Have you echoed the vars confirmed values therein? It's amazing how often
that will catch you.
Otherwise simplicate: comment out a bunch of stuff and build it up bit by
bit, echoing all the while.
Miles Thompson
At 02:07 PM 6/4/2003 -0600, Earl wrote:
Sorry
Hello!!
Are talking about the same Post Question???
On another words, what is being duplicated??
If not, you can use auto_increment.
Dan
On Wednesday, June 4, 2003, at 03:13 PM, [EMAIL PROTECTED] wrote:
I need to modify some company web pages that include a form for asking
the
company
Chip,
Given that you have duplicate entries, then one field, or a combination of
several fields, will probably be unique.
Before adding a record execute a SELECT, using the values from the form
against that combination. If the number of records returned is greater than
0, then execute an
Dan Brunner [EMAIL PROTECTED] wrote on 06/04/2003 01:24:13 PM:
Hello!!
Are talking about the same Post Question???
On another words, what is being duplicated??
If not, you can use auto_increment.
Dan
This pertains to every time a person visits the page and fills in the form
- today,
I need to modify some company web pages that include a form for asking the
company departments questions, such as service dept, etc. As the forms are
currently built there is some field validation but no cookies. This info
is saved in a mysql database, problem is, there are duplicate entries,
Chip,
What's the database being used for then, if not to store and track
questions and replies? If only as a repository of addresses that 's rather
useless.
Unless you want to track the frequency of user's questions, then you could
update a counter field for their email address.
If you've
FYI
this was beginning to bug me out... so I decided to try the trim function
and walla... it worked.
Thanks for ya'll assistance.
---
$eventQuery=ifx_query('select * from event'
.' where e_date = today '
Thanks to everyone for the suggestions. Got it fixed. Just added a couple
lines of code -
$sql1 = select * from endusers where name like '$name';
$result1 = mysql_query($sql1);
$count1 = mysql_num_rows($result1);
if ($count1 == 0 )
$sql = insert into endusers..blah
Hi all,
M-D-Y with leading 0 is how I would like to print dates at my exciting web page.
I am trying DATE_FORMAT and my provider locked up?? :(=
How would you print this?
thx
steve
http://www.aifiles.com
__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar
Greeting everyone, my name is Jason and I am sorry for bugging you since you
probably get a ton of these emails, but I was hoping you all might be able
to help me. I am attempting to design a script that presents the user with
a form with 26 letters to choose from. When they pick a letter I want
print date(m-d-y);
http://us3.php.net/manual/en/function.date.php
Edward Dudlik
Becoming Digital
www.becomingdigital.com
- Original Message -
From: Steve B. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, 04 June, 2003 17:58
Subject: [PHP-DB] Printing date as 04-06-03
Hi
Hey all, anyone know how I can pass an array of parameters to an array?
Basically if I want to pass the parameters in a URL, for example:
viewcart.php?quantity%5B14%5D=2TypesOfInterests=11recalculate=true
I'm using the following but it ain't workin so far.
foreach($shoppingcart['products'] as
Hi,
Im new in this news, and i want to know what news can fix php
problem(programing)??
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi!
wow - cool code! it is very well structured i think (i like it ;-)! i just
would change 2 little details (thats only what i'd do):
if($id) is not enough for me - first of all i want that it can only be
transportet by GET. secondly i do not want people trying to hack my
mysql-server with some
hi
the easier way is as Mike Ford did it very elegantly with this structur:
function obj_date_compare($a, $b) {
return strcmp($a-publisertLang, $b-publisertLang);
}
...
if($ingresser = array_merge($i1 ,$i2))
{
$ingresser = usort($ingresser, 'obj_date_compare');
Hi,
I need for an association to create a form using php/mysql. If I can
understand php, I am not a coder, so if someone had the code I need, I would
really be greatful.
I need :
1. on a page someone identify himself or register to the service using a form
where the person enter name,
Thanks to everyone for the suggestions. Got it fixed. Just added a
couple
lines of code -
$sql1 = select * from endusers where name like '$name';
$result1 = mysql_query($sql1);
$count1 = mysql_num_rows($result1);
if ($count1 == 0 )
$sql = insert into
Hi all,
I had create a session and stored some value into
session.
?php
session();
session_register("id 123","name leooi");
?
How can i retrieved the value???
TQ
Leooi
hi!
well - this is not really a DB-question. and if you take a look at the
php-docu at http://www.php.net/manual/en/language.variables.predefined.php
you'd see that you can access and alter them with $_SESSION or
$HTTP_SESSION_VARS (older versions of php).
.ma
[EMAIL PROTECTED] [EMAIL
Also, you don't register values, you register variables.
$id = 123;
$name = leooi;
$_SESSION['id'] = $id; // same as session_register(id), but better
$_SESSION['name'] = $name; // same as session_register(name), but better
You could also skip the whole variable setting and just do this:
1. Search the archives, they are here: http://www.php.net/mailing-lists.php
2. If you aren't a coder, you probably cannot do what you ask; there aren't
any pre-built simple systems that do exactly what you ask. You could look
on freshmeat.net or sourceforge.com, but I doubt you'd find what you
I have still been getting errors, so here goes again.
I am attempting to design a script that presents the user with a form with
26 letters to choose from. When they pick a letter I want it to take them
to a list of all the entries in my database that begin with the letter they
selected in
On Thursday 05 June 2003 12:25, Fulco of Scarborough wrote:
I have still been getting errors, so here goes again.
[snip]
I am still getting Parse error: parse error, unexpected T_STRING in
/home/wwwfulc/public_html/st/races.php on line 38
Parse error means that you have written incorrectly
Hi
I have RHL9.0 i have PHP 4.2
now when i sedn variable through webpage they cant accept.
apache working well.
mean i develop some application on PHP and Postgresql
so when i login that time user name and password not accept in
SQL Query.
Please Help how to configure it
Ramesh PAtel
--
48 matches
Mail list logo