I want to have a database for my hours for my clients.
I want to create a report where it shows only the hours
back to the last time I was paid. I have no idea how to
go about this. Any help would be appreciated.
Jeff Oien
PHP start here
http://www.webdesigns1.com/php/
--
PHP Database Mailing
Hello,
I'm trying to figure out how to get the data out of a table in a format
which I can easily import into excel. I wanted to have tab delimited fields
enclosed by quotes. I'm not sure how to do this? I check the mySQL doc and
saw the mysqldump call but haven't found any mention of
I would recommend the first two books listed on this page:
http://www.webdesigns1.com/php/books.php
I've read both.
Jeff Oien
Can someone recommend a book that shows how to use PHP and MySQL.
I need to see how to pass parms from a form to a PHP so I can Update, Add
and Delete records
Are encode and decode secure enough for storing credit
card numbers on a Web server?
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL
(First_Name, Last_Name)
VALUES (\Jeff\, \Oien\);
$result = mysql_query($sql,$connection) or die(Failed);
or
$sql = INSERT INTO $table_name (First_Name, Last_Name)
VALUES (\$First_Name\, \$Last_Name\);
$result = mysql_query($sql,$connection) or die(Failed);
yet this will work from the command line
OK, did that and it's just printing the INSERT command back to me.
INSERT INTO OVEvents (First_Name, Last_Name) VALUES(Jeff, Oien)
Any help from here? Thanks.
Jeff Oien
HINT
echo $sql;
/HINT
always helpful, then paste that into the command line client and check the
error
Cameron
That told me my problem. Thank you! I hadn't selected the database
in my connect include but had it in other scripts and not this one.
Long story but thanks for the help. I can stop banging my head now.
Jeff Oien
on 5/9/01 12:29 PM, Jeff Oien at [EMAIL PROTECTED] wrote:
Am I missing
If I have a database that has three records and I delete the entire
third record, when another record is then added will the auto_increment
number be 3 or 4? Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
. Typical code:
?
$connection = @mysql_connect(localhost, jeff, *)
or die(Couldn't connect.);
if ($connection) {
$msg = success!;
}
?
Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Yes they are.
Jeff
Is the MySQL and Apache running on the same machine?
Jeff Oien wrote:
I have MySQL on a new Win2000 install and can't connect to it using PHP.
I am able to connect using the command line. I'm not sure what the next
step is to troubleshoot. I've checked the username
Used Prompt in Win2k. Moved to the apache/mysql/bin directory
and typed mysql.
Jeff Oien
You said you could connect through the command-line. How did you do that?
Jonathan
Here is sample code:
?
$connection = @mysql_connect(localhost, jeff, *)
or die(Couldn't connect
Yes it is running. I don't need to use a password when running from the
command line but I am when connecting through PHP. This is exactly
how I did it on my Win98 machine but it isn't working with W2k.
Jeff Oien
Well the mysql tool doesn't need any authentication usually when you first
set
username
and password specified in the .ini file which I believe I set when I first
installed it. What can I do from here?
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list
I tried your code and got this:
Warning: Can't connect to MySQL server on 'localhost'
Also tried ip address of my machine. So at least maybe that narrows
down the problem.
Jeff Oien
Hi Jeff,
I am using Windows, but am a beginner. Here is some code I use maybe it
will help
I use
in Group1 is Rm101,
this person be assigned Rm102 with that equation being in the PHP
script? If that's the case would I retrieve all the records for Group1 and
find the largest ID (auto_increment type)? Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail
Hi, I'm not quite getting it. If $x is 1 here is what happens.
$varname = C_First_Name.$x;
echo $$varname;
then $$varname prints as $C_First_Name1. However $C_First_Name1
prints the contents of the variable.
Jeff Oien
Hi Jeff.
$varname = C_First_Name.$x;
// e.g. if $x == 3
I found a solution but not sure if it's the most efficient.
I need to first define a simpler variable:
$C_First_Name = ${C_First_Name.$x};
then INSERT VALUE $C_First_Name.
Jeff Oien
Hi Jeff.
$varname = C_First_Name.$x;
// e.g. if $x == 3 then ...
echo $$varname; // ... prints
I can't figure this out. The first code works as far as inserting into a
MySQL database with the !result error checking. The second with the
error code commented out doesn't. I can't figure out why.
Jeff Oien
if ($M_First_Name) {
$sql = INSERT INTO $table_name
(First_Name, Last_Name
Thanks. I was using MySQL by DuBois book as a reference.
Jeff
According to the manual, 12 is YYMMDDHHMMSS and 14 is MMDDHHMMSS.
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DATETIME
Jeff Oien [EMAIL PROTECTED] wrote:
I have a field that's timestamp(12
I have a timestamp field that looks like this
0109011754
but I only want to compare
010801
when doing a SELECT. Is there a way I can do this? Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
I have a variable that is either Yes or No. I would like
NULL to be inserted if it's No. Can I do this?
if ($variable == 'No') {
$variable = 'NULL';
}
then INSERT it.
Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
the numbers fine, I just don't know how to go about putting these all into
variables or an array or if I can do this within a query and then take an
average for them. Hope that made sense. Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
something like this for months.
Cheers (and apologies!)
Russ
I have a cron job that runs on a Unix server that runs a PHP file that
gets a number from a Web site and inserts it into the database.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
That's exactly what I needed. Thanks. I'm absolutely awful with math
and this is my first time averaging numbers from a database.
Jeff Oien
Maybe I am missing the complexity but I would just add them all up as
you retrieve them (or where you are printing them out) and then when you
finish
) code in question
When I print $today it's: 2001-08-15 and the date field in the database
is also displaying as 2001-08-15. Any suggestions? Thanks in advance.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Jeff Oien [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I want to retrieve the last 15 days of data from a certain time but
not today's. I have this but it's still giving me today's data:
$today = date(Y-m-d);
$sql = SELECT volume, date,
I want to make a photo album that will have users who sign up
to create an album and then have the albums open to the public.
I was thinking of doing it like this but I've never done a relational
database before so if anyone thinks of anything I should change
please let me know. Thanks.
Jeff Oien
Thanks for the suggestion but this is a personal project to be used
for learning and as a place for friends to post photos with only the features
that we all want.
Jeff Oien
This has been done. see http://www.photopoint.com
This is a free service available to the public.
rick
Richard
I should have said photo_filename. That was what I intended to do.
Would you suggest one directory for all photos or separate directories
for each user?
Jeff Oien
Rick: I don't see any .php tags there... plus just because someone
else has done it doesn't mean he can't do it as well
I have a date like this in date format in MySQL
2001-08-29
and I want it to say
August 29, 2001
I tried this and it didn't work.
select date_format('creation_date', '%b %D, %Y') from Chart_Users;
Could you tell me what I'm doing wrong or how I should do this? Thanks.
Jeff Oien
--
PHP
date_format(creation_date, '%M %D, %Y') as creation from Chart_Users;
Jeff Oien
Jeff,
mysql select now();
+-+
| now() |
+-+
| 2001-08-29 21:21:50 |
+-+
1 row in set (0.00 sec)
mysql SELECT DATE_FORMAT(NOW(), '%b %D, %Y
is the second etc. and know which the current
one is if the id field has gaps in it. Not sure if that made any sense.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e
they use for other
things I think it would be best for it to be encrypted.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
them the lost details!
Good luck!
Russ
On Fri, 31 Aug 2001 10:38:53 -0500 Jeff Oien [EMAIL PROTECTED] wrote:
I would like users to be able to request to have their password
sent to their email address if they forget it. I would also like it
encrypted in the database though. How
but this I'm just clueless.
Jeff Oien
I would add the field picnumber int or something to your DB.
This is where the pic falls in the order of pics in the album.
The the previous and next should be as simple as doing
select picnumber,piclocation from album where user=$user and
(picnumber=$number-1
into an array? Thanks for the help.
Jeff Oien
I don't know of a way to do the insert in a single query (anyone?!?) with
this... but
assuming the fields in pic are
id int PRI
location varchar(30)
picnumber int
user varchar(20)
$query = Select max(picnumber) from pics where user=\$user\;
$dbq
something?
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Could anyone give me an example of how to use GREATEST
and LEAST in a MySQL query. I want to look through the
last 15 records in a certain field and find the highest and/or
lowest number. Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Here is some code I have for an index page of people who post
charts on the Web, kind of like Yahoo Photos or something.
It displays the album title, number of images and date of last
upload. The page takes about 5-6 seconds to load which is all
in the queries I'm sure. Is there a way I can make
;/a/b/tdtd
align=\left\$cnt/tdtd align=\right\ nowrap$date1/td/tr;
}
[EMAIL PROTECTED] (Jeff Oien) writes:
Here is some code I have for an index page of people who post
charts on the Web, kind of like Yahoo Photos or something.
It displays the album title, number of images and date
and those \n show up in the database data. I must be missing
something. Thanks for any help.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This isn't what I'm looking for because the output is to email not HTML.
What I would like is the natural line breaks in the form input to be
preserved and then result in line breaks in the email without having
to add any \n, which didn't work anyway.
Jeff Oien
check out nl2br() function
I tried wrap=hard already. I should have mentioned that. Sorry if this is
off topic.
Jeff Oien
You need a wrap= within your textarea.. You may need a couple if the
browsers haven't come together on it yet.. But you can check it out here:
http://www.blooberry.com/indexdot/html/tagpages/t
these breaks? I can't find any \n in the data. Then
when it's sent via email of course there are no line breaks displayed.
Jeff Oien
Hiya,
If I remember correctly, you much send both \r and \n to terminate a line
on an e-mail, regardless of the platform. This should include the header
How can I do a query for a distinct field plus get the info from
other fields? I tried this:
select DISTINCT email, name_first, name_last, id from applicants;
and it gave me everything. Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
45 matches
Mail list logo