I have file uploaded to the server by using move_uploaded_file(), the uploaded files have the different file type(extension name like jpg, gif, pdf...)
Now I want to retrieve these files and have it linked from the webpage, I already have the file name, the problem is how the script knows the...
In php file I have a value for example $a=40, and an array $a[]=[10,20,30,40]
is there a function to find if this variable is one of the element of the array? thanks.
I tried to populate data from DB to textarea on the page(file1.php), however as it's impossible to make hyperlink and change color in textarea, so I want to retrieve data to another php file(file2.php) and include it into file1.php, the problem is how to set and restrict the width and height, to...
In the table, there is a column (col varchar 20).
I have these values saved:
1_1
1_2
1_9
1_14
now I want to get the max value "1_14", if the column is INT type, I can easily use MAX(col), but it's the varchar type, if I use MAX(col), I will get "1_9", so how to get the max value in the varchar...
If I want to display the included file's information based on passed value, is it possible to do that?
for example:
file1.php:
<?
$a=$_GET['p'];
if ($a==1) {
print "ABCD";
}
elseif ($a==2) {
print "XYZ";
}
?>
file2.php:
<?
...
include "file1.php?p=1";
...
include "file1.php?p=2";
...
?>
so...
Finally I found the solution.
If I use "select message from tb1", then mssql_query() only take first 255 characters, so I have change "varchar 5000" to "text" type, or do this:
SELECT CONVERT(TEXT message) AS message FROM tb1
then it works fine.
I went to Query Analyzer and changed "Maximum Characters Per Column" to 8192, when I run SELECT statement from "Query Analyzer", it shows correct text(more than 255 characters), but still doesn't display correctly on the browser.
I don't think it's caused by Query Analyzer setting...
So what is the solution to display text that has 255 or more characters?
As the data is alreay stored in the table, only issue is how to display that column.
I use Microsoft SQL server Enterprise Manager to build the table.
1) Yes, I have set the column "message varchar 5000".
2) If I directly go to "SQL server Enterprise Manager-->Console Root-->SQL server group-->tables", and open table, I can see the column "message" has more contents(though I'm...
I have text contents that is saved in the table column "message varchar 5000"
However when I tried to retrieve it, it only display the first 255 characters:
$query="select message from tb1 where id=1";
$result=mssql_query($query);
for ($i=0;$i < mssql_num_rows($result); ++$i)
{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.