Re: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Chris Berlioz
Go to PHP.net, books @ bookstore. Seems like you are trying to insert data from an array into a MySQL table, I would visit http://dev.mysql.com/doc/mysql/en/index.html site too. Good luck. === "Ronald "The Newbie" Allen" <[EMAIL PROTECTED]> wrote in message news:[EM

Re: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Ronald \"The Newbie\" Allen
I have no idea what a class is . I really am a newbie. After you guys help me with this what is a good place to start with learning PHP? "Richard Hutchins" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ...or whatever class contains $row-> functionality? > > > > > > -Original

Re: [PHP-DB] inserting data into database!

2004-05-14 Thread Daniel Clark
$tmp isn't defined yet, so can't append to it's self. (no .= ) $tmp = "ID : $row->ID \n"; > Two questions? > First why am I getting undefined variable tmp , yet it works > Second how would I insert data into this table? > $db_table = 'log'; > $conn = mysql_connect($db_host,$db_user,$db_pas

RE: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Hutchins, Richard
...or whatever class contains $row-> functionality? > -Original Message- > From: Ronald Allen [mailto:[EMAIL PROTECTED] > Sent: Friday, May 14, 2004 4:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: inserting data into database! > > > Now that I closed the bracket > it tells me

RE: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Hutchins, Richard
Have you declared a new instance of the db class anywhere on your page? > -Original Message- > From: Ronald Allen [mailto:[EMAIL PROTECTED] > Sent: Friday, May 14, 2004 4:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: inserting data into database! > > > Now that I closed the bra

[PHP-DB] Re: inserting data into database!

2004-05-14 Thread Ronald Allen
Now that I closed the bracket it tells me that $row is not defined. I have plagiarized from a couple of different places to come up with my code so that is the reason that it may not work that well. Here is my code right now $conn = mysql_connect($db_host,$db_user,$db_pass); if ($conn == true) {

Re: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread dpgirago
> Here is my code now, but I am getting a parsing error > Parse error: parse error, unexpected $end > $db_table = 'log'; > $conn = mysql_connect($db_host,$db_user,$db_pass); > if ($conn == true) { > $insert = "INSERT INTO $db_table SET "; > $insert .= "Base = '" . $row->Base . "', "; > $inse

[PHP-DB] Re: inserting data into database!

2004-05-14 Thread Ronald Allen
Here is my code now, but I am getting a parsing error Parse error: parse error, unexpected $end $db_table = 'log'; $conn = mysql_connect($db_host,$db_user,$db_pass); if ($conn == true) { $insert = "INSERT INTO $db_table SET "; $insert .= "Base = '" . $row->Base . "', "; $insert .= "Date_and_

Re: [PHP-DB] Newbie inserting into a database

2004-05-14 Thread Daniel Clark
Remove the single quotes or change to double quotes around the variables. (in the mysql_connect() statement) > Here is what I have so far? > $DBname = "testdatabase"; > $host="localhost"; > $user="root"; > $password = "password"; > > > $dbconnect = @mysql_connect('$host','$user',

Re: [PHP-DB] Newbie inserting into a database

2004-05-14 Thread Daniel Clark
Remove the single quotes or change to double quotes around the variables. > Here is what I have so far? > $DBname = "testdatabase"; > $host="localhost"; > $user="root"; > $password = "password"; > > > $dbconnect = @mysql_connect('$host','$user','$password','$DBname'); > > I know t

[PHP-DB] Newbie inserting into a database

2004-05-14 Thread Ronald Allen
Here is what I have so far? http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: inserting data into database!

2004-05-14 Thread Torsten Roehr
"Ronald Allen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Two questions? > First why am I getting undefined variable tmp , yet it works > Second how would I insert data into this table? > $db_table = 'log'; > $conn = mysql_connect($db_host,$db_user,$db_pass); > > if ($conn == t

[PHP-DB] inserting data into database!

2004-05-14 Thread Ronald Allen
Two questions? First why am I getting undefined variable tmp , yet it works Second how would I insert data into this table? ID \n"; $tmp .= "Base : $row->Base \n"; $tmp .= "Date_and_Time : $row->Date_and_Time \n"; $tmp .= "Event_Type : $row->Event_Type \n"; $tm

[PHP-DB] [RESOLVED] RE: Secure MySQL Access md5()

2004-05-14 Thread Theisen, Gary
Thanks for the info Hans! I've got it working now. -Original Message- From: Hans Lellelid [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 7:28 PM To: Gary Theisen Cc: '[EMAIL PROTECTED]' Subject: Re: Secure MySQL Access md5() Hi, Passwords in the mysql.users table must be encryp

[PHP-DB] date and time problem

2004-05-14 Thread Kim Jacobs - MWEB
> Hi guys > > I have a script which pulls a date(date default NULL) and a time (time default NULL) > from a MySQL database, now I would like to display that date and time in a 'pretty' > format. > > I've been able to show the date nicely with the help of this: > > $ntime=strtoti