homepage Welcome to WebmasterWorld Guest from 107.22.45.61
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP MS Access
php script to access db from ms access
copongcopong




msg:1302079
 4:25 am on Sep 9, 2002 (gmt 0)

Any one here know a tutorial that would help in configuring or creating a script in php that would access database created in MS Access?

DSN-less (ADO) or ODBC may do, but it would be very helpful if it would very detailed. For example: if it needs to change or add something the INI file in of php.

Thanks for any light you could shed on this. :)

 

Slade




msg:1302080
 4:38 am on Sep 9, 2002 (gmt 0)

This is what I wrote originally(slightly upgraded since this)...

I'd appreciate any comments.


<?php /**** dbaccess.php ****/

function open_db($hostname, $userid, $password, $db_name = -1)
{
if($db_channel = mysql_connect($hostname, $userid, $password))
{
if($db_name != -1)
{
if(mysql_select_db($db_name, $db_channel))
return $db_channel;
else
mysql_close($db_channel);
}
else {
return $db_channel;
}
}
else
return -1;
}

function close_db($host)
{
mysql_close($host);
}

?>

Edit: Sorry, I'm too used to [php][/php] from vBulletin...
PostEdit: OK, why isn't [ code ] working for me in preview mode(at least)???

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved