Hybridd Posted October 20, 2014 Posted October 20, 2014 getting the following errors on the activation.php file. Warning: mysql_query() expects parameter 2 to be resource, null given in /home/reakcity/public_html/activation.php on line 10 Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /home/reakcity/public_html/activation.php on line 11 Invalid Validation Code also it shouldnt say invalid validation code because it is right.. thanks. Quote
KyleMassacre Posted October 20, 2014 Posted October 20, 2014 Well you should be using the Database wrapper provided for you that comes with V2 Quote
Hybridd Posted October 20, 2014 Author Posted October 20, 2014 (edited) database wrapper ? the email activation is a mod that i installed by the way Edited October 20, 2014 by Hybridd Quote
KyleMassacre Posted October 21, 2014 Posted October 21, 2014 Yeah the database class. Lit is saying that param 2 is null which means it it empty ie mysql_query($param1,$param2); or mysql_fetch_array($param1,$param2); Chances are you are just using mysql_query("some db query here"); but you are missing your resource Your connection string. If you use the wrapper then that will handle it all for you (would be better anyways so you can switch to MySQLi on the fly). Long story short, convert you queries and fetches to the applicable $db-> method and you should be good to go. Quote
Hybridd Posted October 21, 2014 Author Posted October 21, 2014 right okay, i dont have the database wrapper so how could i get it? thanks for helping kyle :) Quote
KyleMassacre Posted October 21, 2014 Posted October 21, 2014 If you have V2 then you have the database wrapper Quote
Hybridd Posted October 21, 2014 Author Posted October 21, 2014 how do i find it lol im sorry this is the first time iv been told about it Quote
KyleMassacre Posted October 21, 2014 Posted October 21, 2014 All you need to do is change mysql_query's to $db->query and mysql_fetch_array of whatever to $db->fetch_row Quote
Magictallguy Posted November 12, 2014 Posted November 12, 2014 v1 -> v2 Find: mysql_ Replace with: $db-> Find: fetch_array Find: fetch_assoc Replace with: fetch_row Find: real_escape_string Replace with: escape Make sure you globally define the $db variable in created functions if it hasn't been done. Most conversions are as simple as that, some others require a change of method Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.