Jump to content

help with something simple.


seany123

Recommended Posts

basically i just need this script to update certain values in my database.

 

in my players database i want to update $money - 1000 and $city_id = 2.

 

<?php
include("lib.php");
define("PAGENAME", "Travel2");
?>

<?
{
$query = $db->execute("update `players` set `money`=?, `city_id`=? where `id`=?", array($player->money - 1000, $player->city_id = 2, $player->id));
}
?>

 

ive tried this but it doesnt work.

 

Also at the of the code i want it to Automatically direct to home.php

Link to comment
https://forums.phpfreaks.com/topic/127778-help-with-something-simple/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.