Jump to content
php.lv forumi

mssql querry


Chapman

Recommended Posts

mssql 2000 no mssql 2005 querriji atskiras?

uz msssql 2000, manuprat šim ir jadarbojas:

$error_count = mssql_query 
(
	"UPDATE S_Users
	SET Error = Error+1
	WHERE Nick = $nick " 
);
mssql_execute($error_count);

Bet uz mssql man nedarbojas :(

 

Warning: mssql_query() [function.mssql-query]: message: Invalid column name 'whooper'. (severity 16) in C:\xampp\htdocs\index.php on line 77

Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\index.php on line 77

Warning: mssql_execute() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\index.php on line 78

 

eh.... ka labak, man tabulas "S_Users" laukā "error" ierakstiit +1?

Edited by Chapman
Link to comment
Share on other sites

Man izskatās, ka kļūda ir kur citur nevis tevis ieliktajā kodā. Reku error mesidžs: Invalid column name 'whooper'. Skaties kur tu lieto tādu un skaties vai esi pareizi viņu uzrakstījis.

tas "whooper" bija mainīgā $nick vērtība uz to brīdi!

uz mssql 2000 šāds kverijs man gāja!

tagad piespiedkārtā nākas lietot mssql 2005, un nedarbojas šis :( laikam mssql 2000 no 2005 atskiras sintakse!

Labi, to sintakses problēmu atrisināšu pats ganjau, bet par ko leicina šis error:

Warning: mssql_execute() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\index.php on line 79

Edited by Chapman
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...