FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Reading from SQL databases..

 


Hammy
Im a php/sql virgin.. and i've done some coding, and i cant really test it untill i can see the results.

I have this:

Code:
   $mypoints = mysql_fetch_array(safe_query("SELECT points FROM ".PREFIX."users WHERE userID='$userID'"));


Im not really sure how to recall information from an SQL database, so can anyone tell me if this is correct or not?

I get:
Quote:
Query failed!


Also.. i'm willing to offer a large amount if someone will do this job for me instead. My post is here: http://www.frihost.com/forums/vt-77449.html If 1000frih$ isnt enough, you name it.

Thanks, Hammy.
rohan2kool
the safe_query() function which you are talking about is not a pre-defined php function in the standard distribution (couldn't find it in the docs for 5.2). If you are using any libraries or frameworks which have that function defined, please mention the library. In case it is a function you have defined and are using in php, please paste the code here.
gerpg
safe_query() ? why not just use mysql_query ? its alot easier... and its defined.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.