[PHP-DB] Re: php-db Digest 1 May 2002 19:24:34 -0000 Issue 1181

2002-05-02 Thread Dave Carrera
Hi Frank, Thank you for the help and example you included in your reply. With the help gained by all that answered I concocted this work around which works perfectly. I have included the code to help anyone else who needs this kind of result. It has two table references the first gets admin da

[PHP-DB] Session Problem, Please Help.....

2002-05-02 Thread Hayan AL Mamoun
Dear all, I have a strange problem: I'm using IIS / WINNT4, PHP4 Please check these two files: -- logon.phtml: -- clients/editclient.phtml: When I run logon.phtml, it must create a session variable called CLIENTID and then move to the seco

[PHP-DB] Form Submittion

2002-05-02 Thread PHP News
I have made function that automaticly inserts/updates the fields in a mysql database from the $HTTP_POST_VARS variable. So when a user submits a form is will autimaticly update the database. The problem I am having is that i need to be able to submit unchecked checkboxes. Does anyone know how to

Re: [PHP-DB] Form Submittion

2002-05-02 Thread James Treworgy
I have a work-in-progress class to handle update/edit of forms, but my general strategy for checkboxes has been to include another hidden field which has a value of 1 so you know that there should be an accompanying field. e.g. f_checkboxname is your checkbox c_checkboxname is your fake field in

[PHP-DB] Re: Spaces Problem php & mysql

2002-05-02 Thread Hugh Bothwell
"Paul" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a form on one server which takes a name in one field, intentionally > including spaces as a full name. That value shows up as a form variable as I > intended when I display it on the same server. It

[PHP-DB] Re: Session Problem, Please Help.....

2002-05-02 Thread tatang
Hayan AL Mamoun wrote: try this logon.phtml: -- clients/editclient.phtml: the deZayner > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Using functions in SELECT statements

2002-05-02 Thread Robin S McKenzie
I'm trying perform a case-insensitive test for a name. These are stored like "Association of ...", and I want to convert both the filter and the test data to lower- (or upper-) case. Why doesn't this work: ? SELECT * FROM [Organisation Membership] WHERE lower(organisation) LIKE lower('%$Sear

FW: [PHP-DB] Using functions in SELECT statements

2002-05-02 Thread Peter Lovatt
Could it be the second $ in the lower('%$SearchBox$%') ? Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473 ---

Re: [PHP-DB] Using functions in SELECT statements

2002-05-02 Thread Robin S McKenzie
If only it were that simple - sorry, that was a copying error... It gives the error " undefined function: lower" R Robin McKenzie Department of Mechanical Engineering University of Bristol e:[EMAIL PROTECTED] e:[EMAIL PROTECTED] m:+44(0)7970 058712 "Peter Lovat

Re: [PHP-DB] Using functions in SELECT statements

2002-05-02 Thread Tony James
Hi Robin Instead of using sql to change the case of the search criteria try using php as in the statement below $query=" SELECT * FROM [Organisation Membership] WHERE lower(organisation) LIKE '%". strtolower($SearchBox) ."%')"; Hope this is of some help to you Tony Jam

RE: [PHP-DB] Using functions in SELECT statements

2002-05-02 Thread matt stewart
The problem is that you can't do a php function on a field name inside a query, only on the contents after the query has already been executed! The LIKE function in sql is case insensitive anyway, so you'll pull out all the matches just by using: $sql = "SELECT * FROM Organisation_Membership WHE

Re: [PHP-DB] Session Problem, Please Help.....

2002-05-02 Thread szii
I believe it's because $CLIENTID is not set at ALL before you register it. (ie, isset($CLIENTID) would fail) Therefore it cannot register the variable...there's nothing for it to register or track. Try... $CLIENTID = ""; session_register("CLIENTID"); $CLIENTID="SOMEVALUE"; - Original Mes

Re: [PHP-DB] Re: Spaces Problem php & mysql

2002-05-02 Thread szii
- Original Message - From: "Hugh Bothwell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 6:23 AM Subject: [PHP-DB] Re: Spaces Problem php & mysql > > I've been pounding my head (and the keyboard with searches) over this. Do > I > > have to take the first entry

Re: [PHP-DB] Global Connection object

2002-05-02 Thread szii
Probably. However, you'll have to global($connection_obj) in each function to allow access to that. I think newer versions of PHP have an auto registering global namespace, however, and you may not need that global() call anymore. Why would you want to? I believe the PHP/Zend engine has poolin

[PHP-DB] Re: Using functions in SELECT statements

2002-05-02 Thread Kevin Stone
Your problem may be the use of single quotes around your wildcard search string. I haven't tested it but SQL probably works like PHP in that single quotes denote exact values while double quotes allows evaluation of the quoted string. -Kevin "Robin S McKenzie" <[EMAIL PROTECTED]> wrote in messag

RE: [PHP-DB] Re: Using functions in SELECT statements

2002-05-02 Thread Ryan Jameson (USA)
Is this in SQL server? It seems we don't have enough of the code to be able to tell the problem. The query has to be put in a string and SearchBox has to exist, and this all has to be run from a query function, and well, if you actually show your php code it would help quite a bit. :-)

[PHP-DB] Re: Using functions in SELECT statements

2002-05-02 Thread Kevin Stone
(in response to my own response) By the way it just occured to me that the default SELECT statement is already case insensitive. So is any of this is even necessary? If you want to display the selected items in lower case, then do that in your script with strtolower(); -Kevin "Robin S McKenzie

Re: [PHP-DB] Re: Spaces Problem php & mysql

2002-05-02 Thread szii
AddSlashes() or AddCSlashes() -Szii - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 4:11 PM Subject: Re: [PHP-DB] Re: Spaces Problem php & mysql > On Thursday 02 May 2002 10:10 am, you wrote: > > - Original Message - >

[PHP-DB] url return

2002-05-02 Thread B.J.Rumsey
I have the following query: $query = "SELECT * FROM netjuke_tracks ORDER BY id DESC"; $latemp3 = mysql_query($query) or die("Select Failed!"); $latemp3 = mysql_fetch_array($latemp3); echo "Latest MP3 : "; echo $latemp3[name]; I also have a field called "location" which holds the file location.

[PHP-DB] Re: url return

2002-05-02 Thread David Robley
In article <003101c1f23d$192952f0$0100a8c0@musicnircvthry>, [EMAIL PROTECTED] says... > I have the following query: > $query = "SELECT * FROM netjuke_tracks ORDER BY id DESC"; > $latemp3 = mysql_query($query) or die("Select Failed!"); > $latemp3 = mysql_fetch_array($latemp3); > echo "Latest MP3