• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[ZNOTE] Help Show Marriage on character proffile

Try to change this:
PHP:
 <?php $married_to = mysql_select_single("SELECT 'partner' FROM `marriage_system` WHERE $user_id = 'id'"); ?>
To:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `id` = ".$user_id.";"); ?>
 
Try to change this:
PHP:
 <?php $married_to = mysql_select_single("SELECT 'partner' FROM `marriage_system` WHERE $user_id = 'id'"); ?>
To:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `id` = ".$user_id.";"); ?>

Still showing Married to: No-one.

If have married or not...

I think to take this way i need to change something on script, but im noob on MYSQL things
 
Well, make sure that there's a partner in player

Storagens,rings,outfit everything is working...
On DB:

ymLjqaB.png


qlGX2vc.png
 
Storagens,rings,outfit everything is working...
On DB:

ymLjqaB.png


qlGX2vc.png

Try this:
FROM:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `id` = ".$user_id.";"); ?>

TO:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `player_id` = ".$user_id.";"); ?>

This MUST work.
 
Try this:
FROM:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `id` = ".$user_id.";"); ?>

TO:
PHP:
 <?php $married_to = mysql_select_single("SELECT `partner` FROM `marriage_system` WHERE `player_id` = ".$user_id.";"); ?>

This MUST work.

In man show:
Married to: No-one.

In girl show:
Married to: Array

and Array does not exist. when i clicked
 
In man show:
Married to: No-one.

In girl show:
Married to: Array

and Array does not exist. when i clicked
Im seeing something else.
Here:
PHP:
<li><b>Married to:</b> <a href="characterprofile.php?name=<?php echo $married_to; ?>"><?php echo $married_to; ?></a></li>
Right on <a href="characterprofile.php?name=<?php echo $married_to; ?>"><?php echo $married_to; ?> It's really wrong.
In db, the partner field is a number, so, this gonna call a number and not the player name.
For example:
characterprofile.php?name=17

Do you understand me? You must add the partner name in db instead his id.
 
Im seeing something else.
Here:
PHP:
<li><b>Married to:</b> <a href="characterprofile.php?name=<?php echo $married_to; ?>"><?php echo $married_to; ?></a></li>
Right on <a href="characterprofile.php?name=<?php echo $married_to; ?>"><?php echo $married_to; ?> It's really wrong.
In db, the partner field is a number, so, this gonna call a number and not the player name.
For example:
characterprofile.php?name=17

Do you understand me? You must add the partner name in db instead his id.

if you do it, you will fix in web and break in game...
 
Back
Top