|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-30 20:42 UTC] fmk@php.net
[2000-12-30 20:00 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jun 28 16:00:01 2026 UTC |
Hi there... Here is the problem... using the dll extention for MS SQL Server 7 and using the code below: ---------------Code---------------- unction MySql_DB_Select($server, $user, $pass, $db, $sql,$before ,$layout, $after) { //open a connection $connection = mysql_connect($server, $user, $pass); //built the query //$query = "select linkname, link from links"; //run the query and get the results $result = mysql_db_query($db, $sql, $connection); $buffer = ""; while ($myrow = mysql_fetch_array($result)) { $fieldcount = mysql_num_fields($result); for ($i=0; $i<$fieldcount; $i++) { $fieldnames[$i] = mysql_fieldname($result, $i); } //replace the layout with values $tmp = $layout; foreach($fieldnames as $fieldname) { //print "$fieldname - $myrow[$fieldname]<br>"; $tmp = str_replace("<!--<<" . $fieldname . ">>-->", $myrow[$fieldname], $tmp); } $buffer = $buffer . $tmp; } return "-->" . $before . $buffer . $after . "<!--"; mysql_free_result($result); } ---------------Code---------------- PHP.exe crashes with the following error: ---------------Error--------------- Window Title: OleMainThreadWndName: php.exe Window Message: The instruction at "0x7800d60" refrence memory at "0x0000004". The memory could not be written. ---------------Error--------------- The crash happend when I pass the following value to the var $sql Example: $sql = "select * from customer" Now... if I pass this value Exmaple: $sql = "select name from customer" It works with no problem...