Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Help with Conversion...

IM Me Its Easy [email protected]

 

To convert a v2 mod to work with v1:

}Open the v1 mod you wish to convert and find then find:

session_start();

require "global_func.php";

if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

require "header.php";

$h = new headers;

$h->startheaders();

include "mysql.php";

global $c;

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());

$ir=mysql_fetch_array($is);

check_level();

$fm=money_formatter($ir['money']);

$lv=date('F j, Y, g:i a',$ir['laston']);

$h->userdata($ir,$lv,$fm);

$h->menuarea();

}Replace it with this:

include "globals.php";

_______________________________________________________________________________

}Find:

mysql_

}Replace it with this:

$db->

}Find:

fetch_array

}Replace it with this:

fetch_row

Much safer to do it this way and you're done.

You know that the sql querys in v2 are written differently than in v1, but that doesnt matter, the usual mysql_query will work just the same, there is no

need to change it.

Posted

Re: Help with Conversion...

 

Find:

fetch_array

}Replace it with this:

fetch_row

 

Sometimes doing the above can cause other errors i would leave them as they are for now and as you stated before do the first parts. Iv'e found in some cases where ive changed the array to row doesnt always do justice...

Posted

Re: Help with Conversion...

 

Find:

fetch_array

}Replace it with this:

fetch_row

 

Sometimes doing the above can cause other errors i would leave them as they are for now and as you stated before do the first parts. Iv'e found in some cases where ive changed the array to row doesnt always do justice...

Chances are you haven't globally defined the $db variable.

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...