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
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
$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
...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
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
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) {
> 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
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_
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',
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
Here is what I have so far?
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"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
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
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
> 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
15 matches
Mail list logo