Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Setting up connection to .mdb [NEWBIE]

Codes here !

Moderators: macek, egami, gesf

Setting up connection to .mdb [NEWBIE]

Postby eddy05 » Tue Mar 04, 2003 6:58 pm

I'm a ASP Migrater to PHP :?

I wanna ask how do I establish a connection to my .mdb, update and display it? I'm using it for my hit counter. Previously, in ASP, the way I did it was:

[PSEUDOCODE! NOT ASP CODE!]
Create ADODB.Connection object
Create ADODB.RecordSet object
Open RecordSet using SQL and Connection

RecordSet("hit") = RecordSet("hit") + 1
Update RecordSet

"This is the $RecordSet("hit") times visited"

When it comes to PHP I got lost and can't find any tutorial on databases. Can someone help me? Thanks.

Regards, eddy05
User avatar
eddy05
New php-forum User
New php-forum User
 
Posts: 10
Joined: Tue Mar 04, 2003 6:46 pm
Location: Singapore

Postby Redcircle » Tue Mar 04, 2003 8:24 pm

I will look into it and see if I can find something.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby Redcircle » Tue Mar 04, 2003 8:27 pm

doing a search on google I found this.

http://aspn.activestate.com/ASPN/Cookbo ... ipe/123709

hope that helps.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby eddy05 » Tue Mar 04, 2003 9:24 pm

Thank you very much RedCircle. I managed to get it *almost* working.

I couldn't seem to update the database. It says:

Warning: main(): PropPut() failed: Exception occurred. Source: ADODB.Field Description: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. in d:\FTP\nsync\i_top.inc on line 13

line 13 is simply: $fv->value = $fv->value + 1;

Regards, eddy05
User avatar
eddy05
New php-forum User
New php-forum User
 
Posts: 10
Joined: Tue Mar 04, 2003 6:46 pm
Location: Singapore

Postby eddy05 » Wed Mar 05, 2003 12:05 am

I found an alternate solution to my problem. Thanks!

The way I update my database is through SQL.
User avatar
eddy05
New php-forum User
New php-forum User
 
Posts: 10
Joined: Tue Mar 04, 2003 6:46 pm
Location: Singapore


Return to mySQL & php coding

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron