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
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.
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 -
>
(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
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. :-)
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
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
- 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
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
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
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
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
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
---
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
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
"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
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
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
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
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
20 matches
Mail list logo