A big question mark on this coding..

Hi All,

First of all, thanks to the guys has help me during last 2 post… which is really help me alot.

And now, i’m having another big difficulties on this current issue. My teacher has given me an assignment which is somethin similar like this.

  1. WhiteLabelShared.spGetWeb_ClientLogin
    Frontend user to login to trading platform
    • Test script:
    declare @return bigint
    exec [WhiteLabelShared].[spGetWeb_ClientLogin] @return output, ‘gemiur’, '123456’d
    • All outputs need to be stored in web session for use in the trading platform
    • If @Return = 0, means the operation successful, else fails.

i do not understand what he wants me to do with it. im understand which is want me to do a login with a return of value of 0. which using gemiur and 123456.

What is the meaning of declare @return bigint??
return the value in bigint???

When i ask him, he ask me to figure out myself. So as stupid as i am, please allow me to ask all of you to guide me what should i do with it??

and the condition of this script must be written in php and giving his requirement with using IIS as the web server and mssql as the database. i been given the sample database remote connection which is in mssql 2008. and i been asking to use mssql connect to call and connect. im able to connect to the database. which is a simple script. but im not very understand the task given.

A big thank you for you all who help me… Giving a starting script will be helping me much.

THanks.

Without seeing any code or data I have no idea what is being asked.

Hi.

after long hours of search what is the code i hv to give, i think this is something i found.

the code is for Stored Procedures in php and mssql.

ok,

then what my teacher wants me is to prepare a client login module which using Stored Procedures to call out
the user and store the user in web session. (if im not mistaken what he hv told me)

So, the declare @return bigint and exec [WhiteLabelShared].[spGetWeb_ClientLogin] @return output, ‘gemiur’, '123456’d is what he provide me during the excution in mssql query in mssql express management. What i nd to do is do the same execution but is in php mode.

But i do not know well in mssql… So i’m not understand what mssql bring the output to???

So Please advice me…

Thanks

So this is my test code…

[php]<?php
ini_set(‘display_errors’, ‘On’);
error_reporting(E_ALL);

$sqlconnect=mssql_connect(‘localhost,1433’, ‘sa’, ‘******’);

$sqldb=mssql_select_db(“mydb”,$sqlconnect);

$tableName = “Client”;
$DealingDeskPasswordHint = “123456”;
$FirstName = “”;
$ExID = 0;

$stmt = mssql_init(‘spGetWeb_ClientLogin’, $sqlconnect);

mssql_bind($stmt, ‘@TableName’, $tableName, SQLVARCHAR);
mssql_bind($stmt, ‘@DealingDeskPasswordHint’, $DealingDeskPasswordHint, SQLVARCHAR);
mssql_bind($stmt, ‘@FirstName’, $FirstName, SQLVARCHAR, TRUE, FALSE,32);
mssql_bind($stmt, ‘@ExID’, $ExID, SQLINT1, TRUE, FALSE,32);

mssql_execute($stmt);

echo “Key value is: $keyValue and key status is: $ExID”;

mssql_free_statement($stmt);
mssql_close($sqlconnect);
?>[/php]

but unfortunately, the code did not run well, as i did is copy from a source which im not fully understand…

the code from $tablename i hv already confuse… is that correct putting my table name there?

$DealingDeskPasswordHint is what i need?

after i saw the 123456 which given by him, i think is what he wants to include in it.

Sponsor our Newsletter | Privacy Policy | Terms of Service