Sudantha
-
Posts
23 -
Joined
-
Last visited
Never
Posts posted by Sudantha
-
-
Try like this
CREATE PROC getLogin @username varchar(50),@password varchar(50) AS SET @user = (SELECT * FROM Operator WHERE Call_ID=@username AND PASSWORD=@password) if exists (@user) BEGIN RETURN @user END else return 0
thanks rapa ! ,, i got a solution but donno is this the best method
http://sudantha.wordpress.com/2010/05/25/running-microsoft-sql-mssql-stored-procedures-in-php/
-
i have problems with running MSSQL in PHP Stored procedures but i figured out how to do it
check my blogpost
http://sudantha.wordpress.com/2010/05/25/running-microsoft-sql-mssql-stored-procedures-in-php/
-
Guys i need to get the return value from this code how to do it ?
CREATE PROC getLogin @username varchar(50),@password varchar(50) AS if exists (SELECT * FROM Operator WHERE Call_ID=@username AND PASSWORD=@password) BEGIN return 1 END else return 0
MY php code is following
$stmt=mssql_init('getLogin',$connection); mssql_bind($stmt,"@username",&$uid,SQLVARCHAR,false,true,60); mssql_bind($stmt,"@password",&$password,SQLVARCHAR,false,true,60); $result=mssql_execute($stmt); $arr=mssql_fetch_row($result);
-
1. Install a SQL server instant or run a one
2.Configure php.ini in extensions uncomment mssql.dll
3.use mssql function (same as mysql function refer to php doc )
-
-
u can use Microsoft SQL Server Management Studio Express as a PHPmyAdmin equivalent
http://www.en.wikipedia.org/wiki/SQL_Server_Management_Studio
Download Link : http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en
-
Guys whats the best method in creating reports in PHP like crystal reports in .net platform !
-
double check ur file path also why using % as hierarchy separates
-
Hi guys i have a problem creating stored procedures in MySQL 5.1.45 through phpMyAdmin 3.2.4 , it ways give a SQL error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
Some how i manged to create two stored procedures and they are working properly , thing is even i change the variable names and procedure name and use the same code and compile it gives the same error
DROP PROCEDURE IF EXISTS getacc;.CREATE PROCEDURE getacc( IN uname VARCHAR(50), OUT cbal VARCHAR(50))
SELECT account_balance INTO cbal FROM customers WHERE username=uname;.
-
i think you can fire trigger for this !
-
Nope, webhost. But other php files work, so it can't be the PHP on the webhost?
yes ! it cant be ,, btw to u get any data from a database in this page ? does that db contain any encrypted stuff ? [some times encrypted stuff may be showed in stupid characters ]
some times it may be ur browser rendering prob .. change that and see !
-
May I ask why you say md5 is a bad idea?
Maybe mix md5 and sha1?
lol!
$string=sha1($string);
$string=md5($string);
echo $string;
what will generate this
-
Php compiler? I save as php and upload to my webhost. Other php files i upload and run work perfectly.
i thought ur running in localhost !
-
is this a compiled page .. looks like some parts are compiled and some are not , wired , btw why dont u compile in another machine and see dunno ur php complier is corrupted or not
-
may be it disstory the cookie and creates a new one
for check is javascript is enabled or not why dont u use the <noscript></noscript> tags ?
-
have you used session_start(); and ob_start();
-
whats your IDE ?
-
Guys i need to run a Trigger in MySQL
My code :
$sql="INSERT into transactions values (NULL,'DIRECT DEBIT','".$acc."','2010/5/1','1.20PM',".$updated_res_acc_balance.",'0')";
DROP TRIGGER IF EXSITS
CREATE TRIGGER updatesender AFTER INSERT
ON transactions FOR EACH ROW
UPDATE customers SET account_balance=".$updated_sender_acc_balance." WHERE username ='admin'
";
this gives a error
-
are u getting the error or a warning like this ? “Cannot send headers; headers already sent ….” , i faced thing problem a lot but by reading and experience i overcome this by several ways
1. Dont not print or echo before this line
2. HTML tags before header() will make problems
3. finally the blank spaces
don’t keep any blank spaces before or after the <?php ?> tags ,
I think in huge web projects its better use only a one header in a function and re use it bu passing the $url to the function this will minimize the code debugging time .
-
Just pass your sting to sha1($string); or md5($string);
Then how will the user read it later?
sorry actually i forgot that md5 and sha1 are one way encryption ! . anyways is there any way in php with two way encryption except for ur own algorithm
-
Make sure that you have exiciuted the
mysql_connect(); first your $result variable which passto fetch_array function is empty thats why this says !
-
Just pass your sting to sha1($string); or md5($string);
display pictures with php loop
in PHP Coding Help
Posted
just echo the HTML tags inside the loop