Ok. So the program now displays everything, which is good.
Now my next issue, which hopefully will be easy.
I used the following line of code to pull my word from the db:
$word = mysql_query("Select * from CurrentWords order by rnd(words) limit 1");
I can tell its not working, but I am...
Ok. Sorry to have wasted your time, but apparently the issue became that the server Im developing on is a Unix server that does not support MS Access.
Ive transfered the data to a MySQL db and it works well for the connect.
Now i'm having different issues.
Here is the finished program i...
Ok, I understand what you are doing. The only part that is confusing me me is the last part you showed me.
[code]
$result = odbc_exec($conn, "Select top 1 * from words order by rnd(id)");
$randomWord = odbc_fetch_into($result, $row) ? $row[0] : 'ERROR';
[code]
Where is the variable $row coming...
This is the advantage of having a different pair of eyes. I can't believe that i missed that.
Now, second questions. I have changed the conn file, but For some reason i still cant get the echo command to display the total number of words.
Please help.
Thanks
Ok, so I have this connection as a .php file:
<?php
echo ("Currently connecting to DB");
//Connect to DB
$conn=odbc_connect('wordgame.accdb','','') || die ( "Error Connecting to the database");
//List of all words
$sql1 = "SELECT * FROM words";
$rs1=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.