PHP and MSSQL through ODBC
Posted: Thu Aug 18, 2005 9:47 am
I have a number of tables that contain the Text field type
If we call the field LargeField
Does not display anything but there are not errors
Returns the first 8000 characters as I would expect but does bring the data back
Returns the full text
Obviously I do not want to limit the length of the TEXT field to 8000 characters (It is a TEXT field for a reason), similarily I do not want to have to bring back all the fields all the time.
I have tried to put the select statement into a SQL View or Stored Procedure but these bring back nothing either!
I have ammended the PHP.ini to allow the full 2gb TEXT field limit through.
Can someone please help or give guidance as to what I am missing.
Thanks
If we call the field LargeField
Code: Select all
$l_str_query = "SELECT LargeField FROM TABLE";
$l_rst_assign = odbc_exec($g_con_HEAT, $l_str_query) or die ("<p class='txt_error'>Error Occured" . $l_str_query ."</p>");
echo str_replace(chr(13),"<br/>",odbc_result($l_rst_assign,"LargeField"));Code: Select all
$l_str_query = "SELECT SUBSTRING(LargeField,1,8000) AS LargeField FROM TABLE";
$l_rst_assign = odbc_exec($g_con_HEAT, $l_str_query) or die ("<p class='txt_error'>Error Occured" . $l_str_query ."</p>");
echo str_replace(chr(13),"<br/>",odbc_result($l_rst_assign,"LargeField"));Code: Select all
$l_str_query = "SELECT * FROM TABLE";
$l_rst_assign = odbc_exec($g_con_HEAT, $l_str_query) or die ("<p class='txt_error'>Error Occured" . $l_str_query ."</p>");
echo str_replace(chr(13),"<br/>",odbc_result($l_rst_assign,"LargeField"));Obviously I do not want to limit the length of the TEXT field to 8000 characters (It is a TEXT field for a reason), similarily I do not want to have to bring back all the fields all the time.
I have tried to put the select statement into a SQL View or Stored Procedure but these bring back nothing either!
I have ammended the PHP.ini to allow the full 2gb TEXT field limit through.
Can someone please help or give guidance as to what I am missing.
Thanks