Re: [PHP-DB] SELECTING a sentence from a text field?

2002-05-14 Thread mike
Here is what I use to select the first sentence from my text fields. $result = mysql_query(SELECT news_id, headline, substring_index(body, \.\ ,1) AS body FROM news,$db); Mike ::: Larry French ::: wrote: Hello all. I have a MySQL field called 'description' that contains a paragraph of

[PHP-DB] @@microsoftversion

2002-05-14 Thread Numero 6
I use PHP 4 with mssql server 7. When I run the profiler, I see lots of select microsoftversion, called by PHP. I didn't find a clear documentation of this variable (SQL Books Online never cites it). What is? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] MSSQL2000 'real' data type and multiple SQL statments in one mssql_query()

2002-05-14 Thread Jerome Houston
Apologies for the repeat to those who are in php-general and php-windows. i'm running PHP4.1.1 as a module through Apache 1.3.22 on W2k Server SP2 -- connecting to a MSSQL server running on the same OS. I'm having 2 problems with the system. 1. on mssql_query(*SELECT statments*); that return

[PHP-DB] Zeropadding

2002-05-14 Thread Morten Nielsen
Hi, I use MySQL where I have a table. One of the fields is an INT(6), which I zeropad. When I try to get the number to a variable it doesn't contain all the numbers. If I give it a value of 59 I extract 59 and not 59. Is there a way I can get the hole number? Regards, Morten -- PHP

RE: [PHP-DB] Zeropadding

2002-05-14 Thread Gurhan Ozen
SELECT LPAD(column_name, '6', '0') FROM table_name; Gurhan -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 4:24 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Zeropadding Hi, I use MySQL where I have a table. One of the fields is an INT(6),

[PHP-DB] IIS5 - php4 ISAPI

2002-05-14 Thread jon-david schlough
hi, i have experienced the same problem with IIS, however upgrading (and it definitly IS an upgrade) to apache is not possible since i have production servers running IIS and no person to run apache that can do it in a production environment - my solution is to use CGI instead of ISAPI - it's

[PHP-DB] MSSQL DateTime field formatting?

2002-05-14 Thread Benjamin Walling
I can't seem to find a way to format the field that comes back from my DateTime fields in MSSQL Server. For example, '2002-05-13' shows in Query Analyzer as 2002-05-13 00:00:00.000. If I echo it from PHP, I get May 13 2002 12:00AM. date() won't take it. strftime() won't take it. What do I

RE: [PHP-DB] MSSQL DateTime field formatting?

2002-05-14 Thread Ryan Jameson (USA)
This is how I do it: date(m/d/Y,strtotime(odbc_result($rs,ts))) where $rs is the result set and ts is the name of the field containing the datetime. Ryan -Original Message- From: Benjamin Walling [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 2:59 PM To: [EMAIL PROTECTED]

[PHP-DB] Re: ?!? wats wrong?

2002-05-14 Thread Nicole Amashta
Hi, I am used to ID fields being numeric. If this is the case in your table, remove the single quotes from the id value '1' because that will cause error also. So: SELECT * FROM personen WERE Id != '1' ORDER BY Bijnaam should be: SELECT * FROM personen WERE Id != 1 ORDER BY Bijnaam *IF*

Re: [PHP-DB] Re: ?!? wats wrong?

2002-05-14 Thread Jeffrey_N_Dyke
I love how this keeps getting answeredwere is just spelled wrong. it's so funny that we all miss that though. i did a couple days ago and responded with my own solution that didn't matter, b/c i still didn't spell where correctly. :)

Re: [PHP-DB] MSSQL DateTime field formatting?

2002-05-14 Thread Michael Bretterklieber
Hi, get the latest PHP4 and set set php.ini-param mssql.datetimeconvert to Off the the MSSQL-Module then returns datetime-values in this format: -MM-DD HH24:MI:SS bye, Benjamin Walling wrote: I can't seem to find a way to format the field that comes back from my DateTime fields in