[PHP-DB] MySQL for Billng Question

2001-03-26 Thread Jeff Oien
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

RE: [PHP-DB] HELP: Eporting data from mySQL with PHP

2001-03-30 Thread Jeff Oien
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

RE: [PHP-DB] PHP an MySQL

2001-04-01 Thread Jeff Oien
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

[PHP-DB] Encode/Decode Secure Enough?

2001-04-07 Thread Jeff Oien
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

[PHP-DB] INSERT Problem

2001-05-09 Thread Jeff Oien
(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

RE: [PHP-DB] INSERT Problem

2001-05-09 Thread Jeff Oien
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

RE: [PHP-DB] INSERT Problem

2001-05-09 Thread Jeff Oien
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

[PHP-DB] Autoincrement Question

2001-05-10 Thread Jeff Oien
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

[PHP-DB] MySQL Connect Problem

2001-05-15 Thread Jeff Oien
. 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

RE: [PHP-DB] MySQL Connect Problem

2001-05-15 Thread Jeff Oien
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

RE: [PHP-DB] MySQL Connect Problem

2001-05-16 Thread Jeff Oien
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

RE: [PHP-DB] MySQL Connect Problem

2001-05-16 Thread Jeff Oien
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

RE: [PHP-DB] MySQL Connect Problem

2001-05-16 Thread Jeff Oien
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

RE: [PHP-DB] MySQL Connect Problem

2001-05-17 Thread Jeff Oien
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

[PHP-DB] Alternating Values

2001-07-09 Thread Jeff Oien
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

RE: [PHP-DB] Inserting Variable Variable?

2001-07-18 Thread Jeff Oien
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

RE: [PHP-DB] Inserting Variable Variable?

2001-07-18 Thread Jeff Oien
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

[PHP-DB] Only Insert on Error?

2001-07-18 Thread Jeff Oien
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

RE: [PHP-DB] MySQL Timestamp

2001-07-18 Thread Jeff Oien
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

[PHP-DB] Limit Select Field Characters?

2001-08-01 Thread Jeff Oien
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

[PHP-DB] Inserting NULL?

2001-08-03 Thread Jeff Oien
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

[PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
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

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
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

RE: [PHP-DB] Averaging Numbers

2001-08-15 Thread Jeff Oien
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

[PHP-DB] Query and Date problem

2001-08-15 Thread Jeff Oien
) 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

RE: [PHP-DB] Re: Query and Date problem

2001-08-15 Thread Jeff Oien
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,

[PHP-DB] Photo Album Schema

2001-08-21 Thread Jeff Oien
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

RE: [PHP-DB] Photo Album Schema

2001-08-21 Thread 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

RE: [PHP-DB] Photo Album Schema

2001-08-21 Thread Jeff Oien
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

[PHP-DB] Date_Format Question

2001-08-29 Thread Jeff Oien
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

Re: [PHP-DB] Date_Format Question

2001-08-30 Thread Jeff Oien
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

[PHP-DB] Previous | Next (Again)

2001-08-30 Thread Jeff Oien
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

[PHP-DB] Password Question

2001-08-31 Thread Jeff Oien
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]

RE: [PHP-DB] Password Question

2001-08-31 Thread Jeff Oien
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

RE: [PHP-DB] Previous | Next (Again)

2001-08-31 Thread Jeff Oien
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

RE: [PHP-DB] Previous | Next (Again)

2001-08-31 Thread Jeff Oien
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

[PHP-DB] Unwanted Column Updating

2001-11-03 Thread Jeff Oien
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]

[PHP-DB] GREATEST, LEAST

2002-03-11 Thread Jeff Oien
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

[PHP-DB] Speed Up Code?

2002-03-24 Thread Jeff Oien
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

RE: [PHP-DB] Re: Speed Up Code?

2002-03-25 Thread Jeff Oien
;/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

[PHP-DB] MySQL to Email and Line Breaks

2002-04-13 Thread Jeff Oien
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

RE: [PHP-DB] MySQL to Email and Line Breaks

2002-04-13 Thread Jeff Oien
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

RE: [PHP-DB] Re: MySQL to Email and Line Breaks

2002-04-13 Thread Jeff Oien
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

RE: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread Jeff Oien
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

[PHP-DB] DISTINCT Question

2002-04-20 Thread Jeff Oien
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