Re: [PHP-DB] PHP4 to PHP3 problem

2001-04-11 Thread fabrizio . ermini
On 10 Apr 2001, at 13:49, Rob Griffiths wrote: **50** print "tr bgcolor=#66td{$A["fname"]}/td" . "td{$A["lname"]}/td" . " td{$A["dept"]}/td" . " td{$A["manager"]}/td" . "td{$A["extension"]}/td/tr\n"; Notation with "{" parenthesis is not

[PHP-DB] OBDC date problems

2001-04-11 Thread Walter Franssen
Hello, i have some problems with date's in a query like SELECT * FROM news WHERE fdate = $date AND tdate = #date Can someone help me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

RE: [PHP-DB] images

2001-04-11 Thread Steve Brett
i'm pretty sure i read somewhere that is you use sessions php will not allow an url that contains a path to a file typed in the address bar ... may be wrong though ... and apologies once again for the shopping cart debacle yesterday. some poeple were complaining and rightly so. i received a

RE: [PHP-DB] OBDC date problems

2001-04-11 Thread Steve Brett
i think you need SELECT * FROM news WHERE fdate = '$date' AND tdate = '$date' the dates have to be single-quoted in your query string i generally use $query = "SELECT * FROM news WHERE fdate = '".$date."' AND tdate = '".date."'"; this may not be the best way and i would really appreciate it

[PHP-DB] mssql - unable to read large text fields

2001-04-11 Thread Manuel Prieur
Hello, I'd like to use PHP4 on IIS to access a MSSQL7 server, but i have problems reading large text fields : - "nvarchar" fields are truncated to 255 chars. - "ntext" fields generated the following error message : Warning: MS SQL message: Impossible d'envoyer les donnes ntext aux clients

[PHP-DB] MSSQL and @@identity

2001-04-11 Thread Daniel Fairs
Hi, I'm trying to insert a row into an MSSQL7 table using the SQL string: INSERT INTO person (birthdate,deathdate,sname,othername,motherid,fatherid) VALUES ('1978-10-06',NULL,'Fairs','Daniel',NULL,NULL) SELECT @@identity AS last_identity The actual PHP code is $oRes = mssql_query("SET NOCOUNT

Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-11 Thread Bob Hall
On Mon, 9 Apr 2001, Bob Hall wrote: MySQL is providing an SQL frontend to a bunch of tables and indices, that is it ... it is up to the programmer to handle the "managing of data" part where it revolves around being relational ... I've developed database apps in which the

[PHP-DB] create type

2001-04-11 Thread Olivier Thauvin
Is somebody an example of create type under Postgres (v. 7) I have a probleme with the input function of the new type: parcmicro=# CREATE TYPE "macad" ( internallength = variable, externallength = variable, input = macadi, output = macado, PASSEDBYVALUE); CREATE parcmicro=# create table

Re: [PHP-DB] MSSQL and @@identity

2001-04-11 Thread fabrizio . ermini
On 11 Apr 2001, at 11:40, Daniel Fairs wrote: Hi, I'm trying to insert a row into an MSSQL7 table using the SQL string: INSERT INTO person (birthdate,deathdate,sname,othername,motherid,fatherid) VALUES ('1978-10-06',NULL,'Fairs','Daniel',NULL,NULL) SELECT @@identity AS last_identity

Re: [PHP-DB] MSSQL and @@identity

2001-04-11 Thread fabrizio . ermini
On 11 Apr 2001, at 13:00, [EMAIL PROTECTED] wrote: (returns the number of rows selected, to be more precise). Ehm... forget this part. I momentaneally disconnected the brain, I'm afraid :-) /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini

Re: [PHP-DB] Uploading file into database

2001-04-11 Thread Lucio Stoco
Have you done the file upload into the database? I´m having some problem to put the file (like .doc or .xls) in a database... I´m using 'text' field type, is it right? Do you have any example about it? Tks. ""Zeus"" [EMAIL PROTECTED] escreveu na mensagem

[PHP-DB] Cookies Stuff

2001-04-11 Thread Lisa Elita
Hi everybody, I am trying to use cookies in my website and want to ask you these questions: 1. Header("Set-Cookie") or SetCookie() is better? as the setcookie manual comments said that Header("Set-Cookie") is better. 2. Domain=myserver.com OR domain=.myserver.com OR skip the domain argument is

[PHP-DB] Blob or Link?

2001-04-11 Thread Anderson Sone
Blob or link? Insert just the link is the better way? Does the security is the same? Thanks, Anderson Sone No things of all Only upload the file, move to the right location and insert the file link (location path) into the database. READY! Bey, Daniel Kieviet Xsarus

[PHP-DB] mysql and LIKE

2001-04-11 Thread Larry Hotchkiss
I am in the process of setting up some searches in php for a database. Currently my test data consist of about 10k records. I am unsure what the operational total will be but I would bet less than 1 million records. The table in question has 13 fields and of these 13 fields I would like

RE: [PHP-DB] Help with results output needed

2001-04-11 Thread COMMONS, PHILIP
Hi Liz, thanks for the reply! I have tried this, as well as added to this approach, but I am still not sure what to do with the results of the query (count, sum(*)) to produce the needed final output ("5 chose A for answer1", or "20% chose A for answer1"). Using the code below with my additions

[PHP-DB] DOH! Is it so obvious that i cannot figure it out?

2001-04-11 Thread Michel Laine
I have PHP4 and MySQL running on a W98 PWS webserver. My database is ported from Access and looks fine in MySQL. I can query the database from a webbrowser window, but the result ("capital o with dots" for example) come out as "TM" (as in the trademark symbol). I know that this is because of

Re: [PHP-DB] DOH! Is it so obvious that i cannot figure it out?

2001-04-11 Thread fabrizio . ermini
Should i do something with MySQL? Should i write a routine in PHP that scan every text returned for the characters and if found - change them before printing them to the browser? This seems like a slow process. There's already a function called HTMLentities() that could give you an help,

[PHP-DB] Really Dumb Question...

2001-04-11 Thread Brian Grayless
How do I create a table within my PHP? Heres what I currently have, but I keep getting parse error on the "create" line... $result = mysql_query($sql); create table $propTable ( ID int not null auto_increment primary key, TourName tinytext, TourTitle tinytext, ViewTitle tinytext, TourNum

Re: [PHP-DB] Really Dumb Question...

2001-04-11 Thread Darryl Friesen
How do I create a table within my PHP? Heres what I currently have, but I keep getting parse error on the "create" line... Because create is not a valid PHP command. You have to assign the create statement to a string, _then_ pass the string to mysql_query: $sql = "create table $propTable

[PHP-DB] Connect to MySQL from different computer

2001-04-11 Thread Paulson, Joseph V. \Jay\
Hello- I was wondering how do I connect to a MySQL database, using php, when php and MySQL are on two separate computers? Thanks, Jay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP-DB] connection to database

2001-04-11 Thread Sharmad Naik
Hi, While writing dynamic pages I use pg_connect to connect to the database. I wanted to know whether i alway need to close database connection or while closing the FORM or going to another page does the connect close automatically. Is pg_close necessary to be given ? -- The

Re: [PHP-DB] Really Dumb Question...

2001-04-11 Thread CC Zona
In article 00c701c0c2af$be478f40$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Darryl Friesen") wrote: How do I create a table within my PHP? Heres what I currently have, but I keep getting parse error on the "create" line... Because create is not a valid PHP command. You have to assign the

Re: [PHP-DB] element in the SELECT query

2001-04-11 Thread phobo
you should look at php.net. Having never used postgres, my imagination thinks that perhaps http://www.php.net/manual/en/function.pg-numfields.php is what you're after. and btw, if you're fetching a whole row, don't retreive a field at a time - its very slow. use a fetch_array or something.

[PHP-DB] Only part of a field SQL

2001-04-11 Thread Randall Barber
Our Xerox production printers export a log in ':' delimited format. No big deal, except that each field has a tag like so: Job ID = 99 Job ID = 98 Job ID = 97 See what I mean? I have simply imported the whole CSV file into Access and was now wondering if I could do the

Re: [PHP-DB] Only part of a field SQL

2001-04-11 Thread B. van Ouwerkerk
Is there a way to do this in the query? I am totally inexperienced. Why not remove the part you don't want to import.. very easy in Access. Bye, B. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP-DB] date_format for Oracle

2001-04-11 Thread Richard Crawford
This isn't strictly a PHP question, I suppose... but is anyone aware of a date_format function for Oracle comparable to MySQL's date_format() function? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] date_format for Oracle

2001-04-11 Thread Steve Farmer
Hi Richard, try TO_DATE or TO_CHAR , depending upon what you are trying to do, there are about 2 pages of formatting options for these functions. HTH Steve At 10:12 PM + 11/4/01, Richard Crawford wrote: This isn't strictly a PHP question, I suppose... but is anyone aware of a date_format

[PHP-DB] I know this has been asked before, but....

2001-04-11 Thread SHAWN
I can't find the answer to this, I know it's easy. What's the SELECT statment I want to use to find duplicate entries in a specific field? Thanks in Advance! Shawn Sellars

Re: [PHP-DB] I know this has been asked before, but....

2001-04-11 Thread Ron Brogden
At 03:38 PM 4/11/2001 -0700, SHAWN wrote: What's the SELECT statment I want to use to find duplicate entries in a specific field? SELECT column_name, count(*) AS doubles FROM some_table HAVING doubles 1 GROUP BY colname This should grab all instances where there are multiple instances of

Re: [PHP-DB] date_format for Oracle

2001-04-11 Thread Joe Brown
Also consider the oracle sql ALTER SESSION SET NLS_DATE_FORMAT='-MM-DD HH24:MI:SS' or whichever format you prefer. This sets the default format returned when selecting a date column. -Joe "Steve Farmer" [EMAIL PROTECTED] wrote in message news:p04320402b6fa8a7ffc70@[203.28.219.179]... Hi

[PHP-DB] select substring_index

2001-04-11 Thread Mike Baerwolf
I have a simple news manager and I would like to display the first two sentences of a news story. I got this select statement from the mysql mailing list: SELECT substring_index( body, ". ", 2) FROM news; This works great from the mysql client but when I try it using php with this: $result

Re: [PHP-DB] select substring_index

2001-04-11 Thread Paul Burney
on 4/11/01 7:48 PM, Mike Baerwolf at [EMAIL PROTECTED] wrote: SELECT substring_index( body, ". ", 2) FROM news; This works great from the mysql client but when I try it using php with this: $result = mysql_query("SELECT substring_index(body, "." ,2) FROM news" The way you have this

Re: [PHP-DB] date_format for Oracle

2001-04-11 Thread Steve Farmer
Hi Joe, Yes, I put this in as a standard statement immediately after i connect to the orcale database, it is also possible to put it in your init.ora file i believe rgds Steve At 8:28 PM -0400 11/4/01, Joe Brown wrote: Also consider the oracle sql ALTER SESSION SET

Re: [PHP-DB] create type

2001-04-11 Thread Yasuo Ohgaki
Why you want to create MAC address type? It's already there in V7. macaddr| XX:XX:XX:XX:XX, MAC address Besides, do you have functions defined for INPUT and OUTPUT? You must define them. Refer to PostgreSQL User Manual for details. Regards, -- Yasuo Ohgaki "Olivier Thauvin" [EMAIL

Re: [PHP-DB] connection to database

2001-04-11 Thread Yasuo Ohgaki
PHP takes care of closing it, just like other resources. However, it seems there is bug in closing none persistent PgSQL link in current version. 4.0.5 hopefully fix this. Regards, -- Yasuo Ohgaki "Sharmad Naik" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Re: [PHP-DB] create type

2001-04-11 Thread Olivier Thauvin
Yesterday, I saw in Postgres User Manual that plpgsql cannot define function for create type. The function must be define in C language. But i don't understand this language. Thanks a lot. Le Jeudi 12 Avril 2001 06:25, vous avez crit : Why you want to create MAC address type? It's already