Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: seahorse123
  • Order by date
  1. seahorse123

    how to get the full filename?

    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...
  2. seahorse123

    how to convert into array?

    If I have $v[]="1,2,3", how can I convert this into an array: $v[0]=1 $v[1]=2 $v[2]=3 thanks.
  3. seahorse123

    How to find if the value is inside array?

    thanks.
  4. seahorse123

    How to find if the value is inside array?

    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.
  5. seahorse123

    string replacement question.

    thanks a lot.
  6. seahorse123

    string replacement question.

    Any comments on the function: preg_replace(), reg_replace() and str_replace() what's the difference between them? which one is more often used?
  7. seahorse123

    is it possible to include php file with limited width and height?

    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...
  8. seahorse123

    how to get max value?

    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...
  9. seahorse123

    Is it possible to use INCLUDE to password parameters?

    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...
  10. seahorse123

    Cannot display entire field contents from DB.

    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.
  11. seahorse123

    Cannot display entire field contents from DB.

    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...
  12. seahorse123

    Cannot display entire field contents from DB.

    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.
  13. seahorse123

    Cannot display entire field contents from DB.

    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...
  14. seahorse123

    Cannot display entire field contents from DB.

    Yes, I tried "print $line[0];", it still cut the text to around 255 characters. Any idea?
  15. seahorse123

    Cannot display entire field contents from DB.

    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) {...
  16. seahorse123

    simple question

    I have two tables: tb1, tb2 "tb1" contains fields: user, project, lastupdate "tb2" contains fields: user, profile, address "tb1": each user may have multiple projects, with different update time. Now I want to join this two tables to list all users with profile, address and the latest...
  17. seahorse123

    Question about character convert

    thank you very much.
  18. seahorse123

    Question about character convert

    In the form textarea, I entered: "test" 'test' \test\ /test/ the script uses funtion "htmlentities(string,ENT_QUOTES)" to convert single/double quote and save it to Microsoft SQL server with the format: \&quot;test\&quot; \&#039;test\&#039; \\test\\ /test/ When I tried to retrieve it back with...
  19. seahorse123

    how to build add/remove multiple select form in php?

    I want to create two multiple select box, with four buttons(Add, Add All, Remove, Remove All) between them, user can select one or more item from one side, then click the button so it will be shown on the other side, how can I do that in php? any suggestion will be appreciated.
  20. seahorse123

    Question about SELECT statement.

    Yes, I use Microsoft SQL server, I tried that code, but it doesn't work. Let me explain more detail, I have two tables ("groups" and "users"), each group has one or more users, table "group" contains group name and array that users inside this group(format in array: user1,user2,user3) Now I want...

Part and Inventory Search

Back
Top