Sorry, im noob.
How do i do that, could u give me the sql command?
trigger is a stored procedure that takes action eveytime something happens on a table(s).
ou must specify what you want to happend after/before somethign is done on database
can be delete/update/insert/select
if i recall, i think MSSQL 2055/2008 has a wizard for easy setup triggers
Just add it as a stored procedure and execute it with the "UserJID" as parameter in the _AddNewChar procedure.
im gonna make it this way
do it if you want:
Make a trigger that executes when an insert is done
use the UserJID as a reference and do the insert
the only thing to know right now, is if i can insert a duplicated USERJID on silk table
guys if you WANT to add silks automatically after user reg do the following
Quote:
<?php
/* Simple registration page for silkroad server, by Chernobyl
* Settings are at _inc/config.php
* If you get an mssql connection error, while defining totally correct data
* Just use older ntwdblib.dll for your webserver
*/
require_once('_inc/security.class.php');
require_once('_inc/config.php');
if(!isset($_POST['submit']))
{
echo "<table border='1'>
<form method='post'>
<td>Username</td><td><input type='text' name='username' maxlength='16'></td><tr/>
<td>Password[1]</td><td><input type='password' name='pw1' maxlength='32'></td><tr/>
<td>Password[2]</td><td><input type='password' name='pw2' maxlength='32'></td><tr/>
<td></td><td><input type='submit' name='submit' value='Register'></td>
</form>
</table>";
}
else
{
if(strlen($_POST['username']) < 3) $msg[] = "Username too short";
if(strlen($_POST['username']) > 16)$msg[] = "Username too long";
if(strlen($_POST['pw1']) < 6) $msg[] = "Password [1] too short";
if(strlen($_POST['pw1']) > 32)$msg[] = "Password [1] too long";
if(strlen($_POST['pw2']) < 6) $msg[] = "Password [2] too short";
if(strlen($_POST['pw']) > 32) $msg[] = "Password [2] too long";
if($_POST['pw1'] != $_POST['pw2']) $msg[] = "Passwords are not the same";
$sql = mssql_query("SELECT * FROM TB_User WHERE StrUserId='$_POST[username]'");
$row = mssql_fetch_array($sql);
$silk = mssql_query("INSERT INTO SK_Silk(JID,silk_own,silk_gift,silk_point) VALUES ('$row[JID]','SILK VALUE HERE','0','0');
}
}
}
What if you want to make it with another page you've to change the bold part with your own var.
Make a trigger that executes when an insert is done
use the UserJID as a reference and do the insert
the only thing to know right now, is if i can insert a duplicated USERJID on silk table
You could check first if the table already contains the JID if yes then just add more silk or do nothing. If not then insert the row.
Vsro files. how edit mobs spawn? 01/06/2013 - SRO Private Server - 13 Replies if. i want add mobs spawn in other place.. how make it?
vsro files 09/08/2011 - SRO Private Server - 11 Replies How to get vsro server files
i dont speak turk mayby someone can translate and tell us what is this guy saying :)
if its just a fake post dont start flaming on me just tried to help !
#Request Close
edit clientless to work on vsro 07/20/2009 - Silkroad Online - 0 Replies hi
so far everything that works for isro works for vsro as well but need little edit
when i asked ppl on vsro about the clientless (i need it for plvling) they said to me :get the clientless for isro and just edit version and opcode :confused: and it will work
i know it works somehow cuz i've seen many clientless plvling there
so what should i do? any1 can help me , thanks in advance