RotoGuru Basketball Forum

View the Forum Registry


Self-edit this thread


0 Subject: OT - SQL Help

Posted by: EH Unit
- [33812516] Fri, Nov 14, 2003, 18:19

Hey fellas,

I've been working all day on installing PHP and setting up a web server. PHP is working but and my SQL connection is being established. One thing that has me puzzled however is where I need to save my databases in order to access them.

For instance if I have a dbase saved in Microsoft Access, does it need to be moved to my SQL data folder and if so, how do I reference it in my PHP code.

Any help would be great cuz I'm pulling my hair out trying to get over this last hurdle to getting my site going.

Thanks.
1KJHoops
      ID: 56741112
      Fri, Nov 14, 2003, 19:25
Need more info.
Unix/Microsoft?
mysql? or mssql?
Do you want to just access the .mdb file or do you want to load it into the sql database?

Here is a solution using ADOdb Library. ADOdb Library for PHP Manual
2EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 19:29
Using Windows 98, Personal Web Server, mysql

I just want to be able to access the database file but I'm not sure which directory it has to be in.

I have a data directory and base directory for MySL and I also have a directory for my PWS files. Any idea where to put the database files?
3EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 19:59
I think I may have figured it out.

I guess you have to save the Access file in a special way if you are planning on accessing the data via an SQL server. I'll give that a try.
4EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 20:18
Still no luck.....Access can't find the SQL server....

If anyone has any ideas lemme know.
5KJHoops
      ID: 56741112
      Fri, Nov 14, 2003, 20:28
Ok. Looks like you are just trying to link the access db tables to mysql. Do you have a ODBC driver installed? Read this faq to help you track down your problems.
ODBC FAQ

You can download the driver here MySQL Connector/ODBC 3.51 Downloads
6EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 21:00
okay.....ODBC has been downloaded and installed. Looking at my WINMYSQLADMIN console I can see that it is being detected.

In order to save the files as Data Access Pages I need to inform Access of the SQL server but whatever I put in as the server gives me an error.

"Test connection failed because of an error in initializing provider (DBNMPNTW/Specified SQL server not found"
7EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 21:06
Actually....these data access pages aren't what I want....

I just need to know which directory to have my Access files in i guess.....
8KJHoops
      ID: 56741112
      Fri, Nov 14, 2003, 21:09
Check this. Instead of ip, try using server name (computer name)
9EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 21:13
I'm not sure if this helps but i'll toss it out anyway.

I am able to connect to a database named "test" which seems to have been included in the SQL download.

When i run show databases from the command line it comes up and putting it in my PHP results in a succesful message.

However when I change to any of my Access dbs it fails. Which leads me to believe that the dbs are just in the wrong directory.

Anyone know how I can find where the "test" db that connects is located because I've scoured my directories and I can't find it.
10KJHoops
      ID: 56741112
      Fri, Nov 14, 2003, 21:14
You can just put the web root folder, but you may want to put it in some obsurely named subfolder because if it is underneath the web root it can be downloaded.
11KJHoops
      ID: 56741112
      Fri, Nov 14, 2003, 21:23
I'm heading out for the night. You might want to check out http://www.dbforums.com/. Usually you will get a quick response or you can search and find help.
12EH Unit
      ID: 33812516
      Fri, Nov 14, 2003, 21:28
thanks man...i appreciate your efforts. I'm probably making a really obvious error that i'll kick myself for when I realize it in 5 hours.
13EH Unit
      ID: 33812516
      Sat, Nov 15, 2003, 01:55
BUTT

RSF,

noticed you're lurkin' the boards .....any idea what my problem is boss?
14RecycledSpinalFluid
      Dude
      ID: 204401122
      Sat, Nov 15, 2003, 01:58
Not enough beer?
15Astade
      ID: 91041417
      Sat, Nov 15, 2003, 02:00
is that you CanEHdian?
16EH Unit
      ID: 33812516
      Sat, Nov 15, 2003, 02:07
Yeah man....

me and Twarpy have joined forces in order to form the most electrifying fantasy team on the Ultimate Hoops scene.

EH Unit will be in the Top 50 soon enough.
17 Astade
      ID: 91041417
      Sat, Nov 15, 2003, 02:11
Yea, Twarpy told me about that the other day :)

Didn't know that you changed your Username too (btw, i preferred the other one...)

Tomorrow I will help you with SQL.
Very straightforward, sounds like you made a small error...do you have IM?

email w/ me your details for the weekend.
18EH Unit
      ID: 33812516
      Sat, Nov 15, 2003, 02:12
AIM = CanEHdian Pride

Hit me up man.....RSF showed me where I goofed but now I have more fish to fry.

Or we could just chat, seeing as most of the other Gurupies have me on block.

:)
19RecycledSpinalFluid
      Dude
      ID: 204401122
      Sat, Nov 15, 2003, 02:13
Dang, I gotta find that block button... :)
20EH Unit
      ID: 33812516
      Sat, Nov 15, 2003, 03:15
I'VE DONE IT!!!!

Finally after all this time I've got it. Thanks mostly in part to the wisdom of RSF.

What I was doing was trying to directly reference an Access file from my PHP code.

NO CAN DO!

You have to export the Access table into a database which you've created through MySQL and connect to the dbase that you created. You can then reference a table, which has been exported from Access, once you've connected to the database which the table, through ODBC, was exported into.

Now that I've got that down, rest of it should be a "virtual" walk in the park!
Rate this thread:
5 (top notch)
4 (even better)
3 (good stuff)
2 (lightweight)
1 (no value)
If you wish, you may rate this thread on scale of 1-5. Ratings should indicate how valuable or interesting you believe this thread would be to other users of this forum. A '5' means that this thread is a 'must read'. A '1' means that this is a complete waste of time.

If you have previously rated this thread, rating it again will delete your previous rating.

If you do not want to rate this thread, but want to see how others have rated it, then click the button without entering a rating, or else click here.

RotoGuru Basketball Forum

View the Forum Registry


Self-edit this thread




Post a reply to this message: (But first, how about checking out this sponsor?)

Name:
Email:
Message:
Click here to create and insert a link
Ignore line feeds? no (typical)   yes (for HTML table input)


Viewing statistics for this thread
Period# Views# Users
Last hour11
Last 24 hours11
Last 7 days44
Last 30 days66
Since Mar 1, 2007670421