Jump to content
MakeWebGames

can someone convert this to v2


tittlemouse

Recommended Posts

on index.php

find

$exp=(int)($ir['exp']/$ir['exp_needed']*100);

after add

if ( !$ir['married'] )

{

$marital="<font color='red'>No</font>";

}

else

{

$k=mysql_query("SELECT username FROM users WHERE userid={$ir['married']}", $c);

$marital="".mysql_result($k,0,0)." ";

 

$marital.="[Manage]";

$mair=mysql_query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c);

$ms=mysql_fetch_array($mair);

}

if ($ir['married']>0)

{

$marr=mysql_query("SELECT * FROM users WHERE userid={$ir['married']}",$c);

$ma=mysql_fetch_array($marr);

if ($ma['willmax']>$ir['maxwill'])

{

mysql_query("UPDATE users SET maxwill={$ma['willmax']} WHERE userid=$userid",$c);

}

if ($ir['willmax']<$ir['maxwill'] && $ir['maxwill']>$ma['willmax'])

{

mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);

}

}

if ($ir['maxwill']<$ir['willmax'])

{

mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);

}

if ($ir['married']==0 && $ir['maxwill']>$ir['willmax'])

{

mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);

}

Link to comment
Share on other sites

Re: can someone convert this to v2

on index.php

find

 

$exp=(int)($ir['exp']/$ir['exp_needed']*100);

after add

 

if ( !$ir['married'] )

{

$marital="<font color='red'>No</font>";

}

else

{

$k=$db->query("SELECT username FROM users WHERE userid={$ir['married']}", $c);

$marital="[url='viewuser.php?u={$ir[']".mysql_result($k,0,0)."[/url] ";

 

 

$marital.="[[url='partner.php']Manage[/url]]";
$mair=$db->query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c);
$ms=mysql_fetch_row($mair);
}

if ($ir['married']>0)
{
$marr=$db->query("SELECT * FROM users WHERE userid={$ir['married']}",$c);
$ma=mysql_fetch_row($marr);
if ($ma['willmax']>$ir['maxwill'])
{
$db->query("UPDATE users SET maxwill={$ma['willmax']} WHERE userid=$userid",$c);
}
if ($ir['willmax']<$ir['maxwill'] && $ir['maxwill']>$ma['willmax'])
{
$db->query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);
}
}
if ($ir['maxwill']<$ir['willmax'])
{
$db->query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);
}
if ($ir['married']==0 && $ir['maxwill']>$ir['willmax'])
{
$db->query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c);
}

 

Not tested but it should work

Link to comment
Share on other sites

Re: can someone convert this to v2

 

can someone import this into a index code for v2

Tittlemouse, if you want to be a good developer / programmer, you need to learn to do these things for yourself, and do the research for yourself, im sure you can find all you need here on the forums and if not there is always google and as a last resort yes you can post on the forum, but your asking people to do simple things that anyone could do which i know for a fact are on the forums.

Link to comment
Share on other sites

Re: can someone convert this to v2

true you are right tezza.

i am a rubbish coder and i will not learn nothing if i do not try,

is there a mccodes coding guide somewhere on this forum so i can learn and code for myself

it is about time that i stop relying on other members to do what i should learn

Link to comment
Share on other sites

Re: can someone convert this to v2

mccodes guide?

You need a php guide, an html guide, a mysql guide, and maybe a javascript guide.

HTML is most important, since your users will see nothing without html.

PHP is the next one because it connects mysql to the html.

javascript is the last one because you could do without it completely.

Link to comment
Share on other sites

Re: can someone convert this to v2

 

wow w3schools.com is a great site i will start with html and css and when i am good at that i will move on.

if i am a total noob how long you think i will need to learn?

forever simple as it is

just start with the primary basic requirement which is

* Learn to read and understand a html script , if you can do that you are already a step further

reading and understanding is not oh table well that's a table with some text in and you can give it a border

it's understanding what the usage actually is and what all possible attributes are and what they do.

I'm sure a ton doesn't even now what cellpading and cellspacing is not even thinking on how the majority would explain the rules attribute. Off course there are easy ones that doesn't need brains like event attributes as these are self explaining.

Now html will also help you understanding mysql better as weird as it sounds

The table structure in html is basicly a database setup, table, columns, rows but that structure can be found everywhere most fail with mysql as they just doesn't know the basic structure of a database.

Link to comment
Share on other sites

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