Jump to content
MakeWebGames

Recommended Posts

Posted

line 44 $maxtopic_id = mysql($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");

line 45 $mtid = mysql_result($maxtopic_id,"mtid");

Deprecated: mysql() [function.mysql]: This function is deprecated; use mysql_query() instead in /home/mafiacri/public_html/massmail.php on line 44

Warning: mysql_result() expects parameter 2 to be long, string given in /home/mafiacri/public_html/massmail.php on line 45

Posted
use mysql_query() instead in /home/mafiacri/public_html/massmail.php on line 44

Do as it says :)

 


$maxtopic_id = mysql_query($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");


 

I _think_ the other error will sort it self.

In general, when getting such error, just Google the first part of the error (IE: Deprecated: mysql() [function.mysql]: This function is deprecated; use mysql_query() instead in), without the custom to you data. Millions have prob had the issue before you did.

Posted

Warning: mysql_query() expects parameter 2 to be resource, string given in /home/mafiacri/public_html/massmail.php on line 44

Warning: mysql_result() expects parameter 1 to be resource, null given in /home/mafiacri/public_html/massmail.php on line 45

Posted

Ooops did not read that fully.

You digging up 1996 or something.

 

$mtid = mysql_query("SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");
// possibley not needed ine 45 $mtid = mysql_result($maxtopic_id,"mtid");

 

If that fails, post me the database connection details, usually in a file named something like db.php or config.php

Posted

$mtid = mysql_query("SELECT topicid FROM game_topic WHERE date2='$clock2'");

Prob wont help but worth a try. I think you need to look at the database connection. As I dont think a connection has been made, nor a database selected. Changing this will lead to a chain reaction, and when that is done. mysql_query is decapitated in PHP 5.5.0

Purhasp someone who is working with this engine will be able to help

Posted
$maxtopic_id = mysql_query ( 'SELECT `topicid` FROM `game_topic` WHERE (`date2` = "'.$clock2.'")' );
//Should check there is rows first...
$mtid = mysql_result ( $maxtopic_id );
echo $mtid;
Posted

Same error for both code it is php 5.3 this all worked before the upgrade to php 5.3. Lol hate upgrades lol

its for mass mail and it works fine i am only one to see error but i just hate errors

Posted

line 91 $maxtopic_id = mysql_query ( 'SELECT `topicid` FROM `game_topic` WHERE (`date2` = "'.$clock2.'")' );

line92 //Should check there is rows first...

line 93 $mtid = mysql_result ( $maxtopic_id );

line 94 echo $mtid;

 

Warning: mysql_result() expects at least 2 parameters, 1 given in /home/mafiacri/public_html/forum.php on line 93 every file with this code shows same error but all works. this started when host went to php 5.3

Posted (edited)

mysql_query requires parameter 2 to be a connection id, if there is no previously opened connection in your current session. So with that being said... Are you connecting to the database. (Is the file where you connect to your db being included or are you connecting in the current file?)

Edited by bluegman991
Posted

line 88 mysql_query("INSERT INTO game_topic (gang, cat_id, forum_type, topic, date, date2, date2_year, origin, origin_userid)

line 89 VALUES (\"$user_class->gang\", \"$cat_id\", \"$forum\", \"$topic\", \"$clock\", \"$clock2\", \"$clock2_year\", \"$user_class->username\", \"$user_class->id\") ");

line 91 $maxtopic_id = mysql($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");

line 92 $mtid = mysql_result($maxtopic_id,$mtid);

line 94 mysql_query("INSERT INTO game_posts (cat_id,topicid, message, date, date2, poster, poster_userid)

line 95 VALUES ('$cat_id','$mtid', \"$message\", '$clock', '$clock2', \"$user_class->username\", \"$user_class->id\") ");

$notice = "The topic has been posted.";

Posted

Deprecated: mysql() [function.mysql]: This function is deprecated; use mysql_query() instead in /home/mafiacri/public_html/forum.php on line 91

Warning: mysql_query() expects parameter 2 to be resource, string given in /home/mafiacri/public_html/forumil.php on line 91

Warning: mysql_result() expects parameter 1 to be resource, null given in /home/mafiacri/public_html/forum.php on line 92

get these error when i change line 91 $maxtopic_id = mysql_query($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\""); beforeline 91 $maxtopic_id = mysql($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");

Posted

Apply wat

line 88 mysql_query("INSERT INTO game_topic (gang, cat_id, forum_type, topic, date, date2, date2_year, origin, origin_userid)

line 89 VALUES (\"$user_class->gang\", \"$cat_id\", \"$forum\", \"$topic\", \"$clock\", \"$clock2\", \"$clock2_year\", \"$user_class->username\", \"$user_class->id\") ");

line 91 $maxtopic_id = mysql($db_name, "SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");

line 92 $mtid = mysql_result($maxtopic_id,$mtid);

line 94 mysql_query("INSERT INTO game_posts (cat_id,topicid, message, date, date2, poster, poster_userid)

line 95 VALUES ('$cat_id','$mtid', \"$message\", '$clock', '$clock2', \"$user_class->username\", \"$user_class->id\") ");

$notice = "The topic has been posted.";

Posted (edited)

thebobby,

Mysql requires parameter 2 to be a connection id, if there is no previously opened connection in your current session. So with that being said... Are you connecting to the database. (Is the file where you connect to your db being included or are you connecting in the current file?)

I requested that you post the database connection details.

I seriously think you need to learn some basic things before attempting to get this running.

Things such as:

http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/connect-to-mysql-database.aspx

Edited by Someone
think there was confusion regarding who the msg was for :)
Posted

Take a look at your line 88 and line 91, see the difference? You should now change line 91 to look the same as 88. It should look something like this

line 91 $maxtopic_id = mysql_query("SELECT topicid FROM game_topic WHERE date2=\"$clock2\"");
line 92 $mtid = mysql_fetch_assoc($maxtopic_id);

Also please use code tags. It makes it easier to read

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...