[PHP] Database Code Portability

2001-02-16 Thread Dave Haggerty

I haven't seen this issue discussed, sorry if I missed it:

My question is why are the PHP database functions so unportable?  Is there a
reason why they have to be specific to, say MySQL.  It seems to me (even
though I am an amatuer to this stuff) that the code should be much more
easily portable from one db to another?

Do most coders add an abstraction layer themselves?  Or maybe people just
don't port PHP code much and so don't worry about it?

Mainly curious

Dave




-- 
PHP General 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] A apache/php/mysql/linux security tutorial?

2001-01-27 Thread Dave Haggerty

I have read through variouos docs to learn about security issues for running
a linux/apache/mysql/php server and have learned a lot.  What I'd like,
though, is to know if there is an overall tutorial on this specific topic,
where all the info is in one place?  Hopefully aimed at the newbie?

Thanks

Dave


-- 
PHP General 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] Not quite relevant question about coding and query

2001-01-18 Thread Dave Haggerty



-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 9:57 PM
To: 'Jacky@lilst'; [EMAIL PROTECTED]
Subject: RE: [PHP] Not quite relevant question about coding and query


 $query = "insert into user values
('firstname','lastname','address','phone')";
 $resultinsert = mysql_query($query);

 $getID = "select userID from user"; // Will this get me the
 // Id of the record I just inserted?
 $resultID = mysql_query($getID);

No, it won't - it'll return every userID in the table.

If your userIDs are sequential, you can just select "MAX(userID)" instead
of userID.

Jason

--


Im no expert...I am learning this stuff "as we speak"but shouldn't
mysql_insert_id() do it?

Cheers,

Dave


-- 
PHP General 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]