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
shows 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. Thi
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/indexdo
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 ou
d 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
P BY f.id'
> .' ORDER BY u.album_title ASC';
>
> $result = @mysql_query($sql,$connection) or die(" Couldn't execute query.");
>
> while ($row = mysql_fetch_array($result)) {
> $id = $row['id'];
> $username = $row['user
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 t
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
W() where id = '$id'";
However, time1 is being updated to be the same as time2 after
the exit and I don't want it to be. Am I missing 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]
ut them 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 = &
sword stuff 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,picloc
retrieve lost
> password
> >
> > if '$id' is set then have the user input their password and email address
> (the one they registered
> > with) and query the database for a username on the basis of the inputted
> info, and email it using
> > mail() to t
sword 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]
s 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 administrato
;) from Chart_Users;
or
select 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 |
> +
Isn't that what I tried?
Jeff Oien
> Although it might be better to format the date in php, don't forget you can
> also do date formating in the select string. The date format functions for
> mySQL can me found here:
>
> http://www.mysql.com/doc/D/a/Date_and_time_func
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 th
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
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.
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
> "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:
That did it. Anybody know why?
Jeff Oien
> Not sure if this will make a difference, but try putting single quotes
> around $today:
> date != '$today'
>
> - Jonathan
>
>
> -Original Message-
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent:
R by id desc LIMIT 15";
(date != $today) 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 PR
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) a
..how do you do this!? I've been
> wanting 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
y
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
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-ma
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
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]&
I have a field that's timestamp(12) which should be MMDDhhmm
but what I'm getting is
010718125000
what I was expecting was
200107181250
How can I get what I was expecting? Thanks.
Jeff Oien
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROT
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
(F
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;
>
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
only $C_First_Name get interpolated. Any solutions? Thanks.
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]
st 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 unsubscri
I found a "solution." I uninstalled (and deleted the ini file) MySQL
v. 3.23.36 and installed v. 3.23.38 and now it works. I have no
idea why. But I learned some things in the process. Thank you
very much for all the help.
Jeff Oien
> Where you have your variable set to "
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
&
set a
> password for root in the database.
>
> Wayne
>
>
> On Thu, 17 May 2001 13:20, Jeff Oien wrote:
> > > > Here is sample code:
> > > > > > > $connection = @mysql_connect("localhost", "jeff",
gt;
> > This is on my machine only used by me. I also tried connecting to
> > IP address and 127.0.0.1 and it still won't work. Thanks.
> > Jeff Oien
>
> Are your the 'root' rather than 'jeff'? Did you alter the grants and
> apply the password? If no
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 wh
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&qu
Here is sample code:
This is on my machine only used by me. I also tried connecting to
IP address and 127.0.0.1 and it still won't work. Thanks.
Jeff Oien
> 1. Can you set up a simple connection for us to test out? Allow people from
> any host (%) to connect.
> 2. Try connecti
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
> &g
rking fine
otherwise. Typical code:
Thanks.
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]
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
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:
>
>
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
>
> echo $sql;
>
>
> always helpful, then paste that into the c
ERT INTO $table_name (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\")"
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
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
> a
> 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
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 Mail
52 matches
Mail list logo