Greetings,
I am attempting to connect a new database table to one of my PHP websites. The data is modified using Microsoft Access. This data is then linked to the website via PHP. The part of the code that needs to change is as follows:
$conn = odbc_connect(‘database’,‘user’,‘password’);
$sql = "select * from SPX_NFLPlayer,NFLMASTER where NFLMASTER.pyid=SPX_NFLPlayer.PlayerID and SPX_NFLPlayer.PlayerID = " . $PlayerId;
$rs = odbc_exec($conn,$sql);
This is the original code. The databases shown here are no longer used as we moved our data to a new table called FBGRatings2. I have tried to get this new table linked to my PHP code, but it won’t work. Here is what I tried:
$conn = odbc_connect(‘database’,‘user’,‘password’);
$sql = “select * from FBGRatings” . $PlayerId;
$rs = odbc_exec($conn,$sql);
I thought that it had something to do with the $sql line, but I am not sure. Any help would be great considering that I am a novice. Thank you!
Dan