Page 1 of 1

mssql_execute() problem

Posted: Fri Jul 07, 2006 4:27 am
by banhthidiem
Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

<?php


$stmt = mssql_init("test");
$name = "banh";
$data = "duoc roi";
mssql_bind($stmt, "@dataName", $name, SQLVARCHAR, TRUE);
mssql_bind($stmt, "@dataData", $data, SQLTEXT, TRUE);
mssql_execute($stmt) or die("could not perform insert");

unset($stmt);  // <---VERY important

?>
but return it:
Warning: mssql_execute() [function.mssql-execute]: could not retrieve results in D:\banh\cong viec\website\forum\test1.php on line 58
could not perform insert


Who can help me?


Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Jul 07, 2006 4:30 am
by JayBird
1 post, 1 rule break...that's a brilliant 100% record :roll:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.