[PHP-DB] Re: Multiple same values only wanting one

2003-07-16 Thread Pete Morganic
select distinct(myCol) from table Ron Allen wrote: How do I select * from a table, but I do not want it to return the same value if two fields are the same. Example test test test test new new new Results that I want are just test new Any suggestions? -- PHP Database Mailing List (http://www

[PHP-DB] Searching a file for text surrounded by brackets

2003-07-16 Thread Jamie Saunders
Hi, I need a way of searching a file for text between two brackets, below is an example of a couple of lines from the file I'm searching: {L_LOGIN} {L_LOGOUT} So I'll need to search the above for text between the '{' and '}' brackets and read each into an array. -- Jamie Saunders Media Architec

RE: [PHP-DB] Searching a file for text surrounded by brackets

2003-07-16 Thread Ford, Mike [LSS]
> -Original Message- > From: Jamie Saunders [mailto:[EMAIL PROTECTED] > Sent: 16 July 2003 11:20 > > Hi, I need a way of searching a file for text between two > brackets, below > is an example of a couple of lines from the file I'm searching: > > {L_LOGIN} > {L_LOGOUT} > > So I'll need

[PHP-DB] Informix varchar & nonprintable characters

2003-07-16 Thread Agusti Fita
Hello: We have developed a project that runs over several database engines with de ADODB php library. At this moment it's runing over MySQL, MSSQL Server and Informix through the Linux Informix Client SDK ODBC driver. We need to store non-printable characters into varchar fields (ASCII code be

[PHP-DB] Form Actions in PHP

2003-07-16 Thread Rick Dahl
I have a small problem. I need to have a form post to two different locations. If a variable is a certain value, it goes to location_one.cgi and if it is another value, it goes to location_two.cgi. This may turn out be a html problem but I figured php was the way to go since it is more dynami

[PHP-DB] Re: Form Actions in PHP

2003-07-16 Thread Pete Morganic
you need a bit of JAvascript Rick Dahl wrote: I have a small problem. I need to have a form post to two different locations. If a variable is a certain value, it goes to location_one.cgi and if it is another value, it goes to location_two.cgi. This may turn out be a html problem but I figured

[PHP-DB] Re: Form Actions in PHP

2003-07-16 Thread Matthew Ward
Have a PHP script that intervenes, ie. // HTML File // decide.php "Rick Dahl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have a small problem. I need to have a form post to two different locations. If a variable is a certain value, it goes to location_one.cgi and if it

[PHP-DB] sql to find one year in datetime MySQL column

2003-07-16 Thread bill
How can I find all the records for a single year from a db that has a datetime column (in MySQL)? This seems to work: SELECT * from mytable WHERE tstamp < '2003-01-01 00:00:00' AND tstamp > '2002-01-01 00:00:00' But this doesn't: SELECT * from mytable WHERE tstamp LIKE '2002%' Is there a simple

[PHP-DB] Re: sql to find one year in datetime MySQL column

2003-07-16 Thread Pete Morganic
select * from mytable where year(tstamp) = 2003 Bill wrote: How can I find all the records for a single year from a db that has a datetime column (in MySQL)? This seems to work: SELECT * from mytable WHERE tstamp < '2003-01-01 00:00:00' AND tstamp > '2002-01-01 00:00:00' But this doesn't: SELECT

[PHP-DB] MS-SQL => Exec stored procedures

2003-07-16 Thread Stephen March
Anybody have code that WORKS (hehe) for executing a MS-SQL stored proceedure through PHP? exec viewFacilities() Thanks in advance! ~Steve -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MS-SQL => Exec stored procedures

2003-07-16 Thread colbey
my experience in the past is just: $SQL = "sp_runthis $param1, $param2, $param3"; $RES = mysql_query($SQL); may have to prefix with exec like you mentioned... change sp_runthis to your procedure name... probably still works the same.. On Wed, 16 Jul 2003, Stephen March wrote: > Anybody ha

Re: [PHP-DB] MS-SQL => Exec stored procedures

2003-07-16 Thread Stephen March
Thanks for the immediate response... it turns out my co-worker actually had a bug in his stored proc ... (nobody ever admits the problem is their own eh?) hehe ~Steve [EMAIL PROTECTED] wrote: my experience in the past is just: $SQL = "sp_runthis $param1, $param2, $param3"; $RES = mysql_que

[PHP-DB] Database connection

2003-07-16 Thread Martin
I'm trying to use PHP 4.2.3 in a database application. Unable to connect to database server."); exit(); }else { print "Connected!"; } ?> Gives Connected? Fatal error: Call to undefined function: mysql_connect() in /var/www/html/irm/test.php on line 3 While changing the line to $dbcnx = @mysql

[PHP-DB] editing part of a fiedl!

2003-07-16 Thread JeRRy
Hi, Yep the subject may sound confusing so let me explain. I have this message board that uses PHP and mysql. Now I had to transfer the whole lot to my server, but due to the change and a domain registration the actual path to images in messages has changed. So in the post on the old host it sh

[PHP-DB] editing part of a fiedl!

2003-07-16 Thread JeRRy
Hi, Yep the subject may sound confusing so let me explain. I have this message board that uses PHP and mysql. Now I had to transfer the whole lot to my server, but due to the change and a domain registration the actual path to images in messages has changed. So in the post on the old host it sh

[PHP-DB] editing part of a fiedl!

2003-07-16 Thread JeRRy
Hi, Yep the subject may sound confusing so let me explain. I have this message board that uses PHP and mysql. Now I had to transfer the whole lot to my server, but due to the change and a domain registration the actual path to images in messages has changed. So in the post on the old host it sh

[PHP-DB] editing part of a fiedl!

2003-07-16 Thread JeRRy
Hi, Yep the subject may sound confusing so let me explain. I have this message board that uses PHP and mysql. Now I had to transfer the whole lot to my server, but due to the change and a domain registration the actual path to images in messages has changed. So in the post on the old host it

Re: [PHP-DB] Database connection

2003-07-16 Thread colbey
undefined function means you don't have mysql support compiled in... prefixing any function with @ suppresses any error messages... On Thu, 17 Jul 2003, Martin wrote: > I'm trying to use PHP 4.2.3 in a database application. > > print "Connected?"; > $dbcnx = mysql_connect("localhost","root","a

RE: [PHP-DB] Form Actions in PHP

2003-07-16 Thread Duane Lakoduk
Don't know if this got answered yet. I usually do this by checking the variable before submitting the form and then adjusting the form action. It turns out to be a JavaScript problem. if(variable=="a"){ document.form.action="location_one.cgi"; }else if(var=="b"){ document.form.act

Re: [PHP-DB] editing part of a fiedl!

2003-07-16 Thread Jason Wong
On Thursday 17 July 2003 12:28, JeRRy wrote: > So something like this: > > Hi bob > all is well, cya! > > So old posts have the wrong image location but new > posts show the correct place to the image as it's > configured to do it but old posts since they are > already in the database show up wro