php-general Digest 17 Apr 2005 20:06:06 -0000 Issue 3403

Topics (messages 213230 through 213238):

Re: query error
        213230 by: Dasmeet Singh

Re: chat script
        213231 by: Dasmeet Singh
        213232 by: Michelle Konzack

Re: ACM Dynamic Languages Symposium
        213233 by: Roel Wuyts

Replacing spaces with commas
        213234 by: W Luke
        213235 by: trlists.clayst.com
        213236 by: W Luke

mysql insert function
        213237 by: Dasmeet Singh

Localhost not working with cookies
        213238 by: Proudly Pinoy

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message --- pete M wrote:
I've got a database table with a whole list of "windows" file paths.

eg
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Outlook.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft PowerPoint.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Word.lnk
Advent Tower PC\C\Program Files\Microsoft Office\MS Access Workgroup Administrator.lnk
Advent Tower PC\C\Program Files\Microsoft Office\MSCREATE.DIR
Advent Tower PC\C\Program Files\Microsoft Office\OF97SPEC.INI
Advent Tower PC\C\Program Files\Microsoft Office\Office
Advent Tower PC\C\Program Files\Microsoft Office\Office\1033


Now I want my DB query to search for directories .. here's a sample query select * from ff_files where full_path like 'Advent Tower PC\C\freeserve\help\images\%'

doesnt work as the % is taken as a literal '%'

I've aslso tried
like 'Advent Tower PC\\C\\freeserve\\help\\images\%'

I'm completely lost ..
all I want is to return all rows that start with
'Advent Tower PC\C\freeserve\help\images\'

tia
Pete

Try like 'Advent Tower PC\\C\\freeserve\\help\\images\\%'


Free cPanel Web Hosting http://hostwindow.info/web-hosting/2/free-cpanel-web-hosting/

--- End Message ---
--- Begin Message ---
Sukalyan Banga wrote:

  Sir,
     I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some 
error what should I do.

                                 sukalyan



I got a virus warning while trying to open your site..


Free cPanel Web Hosting http://hostwindow.info/web-hosting/2/free-cpanel-web-hosting/

--- End Message ---
--- Begin Message ---
Am 2005-04-17 13:53:21, schrieb Dasmeet Singh:
> Sukalyan Banga wrote:
> 
> >  Sir,
> >     I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows 
> >     some error what should I do.
> >
> >                                 sukalyan
> >
> >   
> >
> I got a virus warning while trying to open your site..

For me it was working fine...


Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
                       CALL FOR PAPERS FOR THE

           ACM Dynamic Languages Symposium 2005
                                October 18, 2005
                            San Diego, California
                      (co-located with OOPSLA'05)

   URL: http://decomp.ulb.ac.be:8082/events/dls05/

-----------
Abstract
-----------

In industry, static languages (such as Java, C++ and C#) are much more widely used than their dynamic counterparts (like CLOS, Python, Self, Perl, php or Smalltalk). So it appears as though dynamic language concepts were forgotten and lost the race.

But this is not the case.

Java and C#, the latest mainstream static languages, popularized to a certain extent dynamic language features such as garbage collection, portability and (limited forms of) reflection. In the near future, we expect this dynamicity to increase even further. E.g., it is getting clearer year after year that pervasive computing is becoming the rule and that concepts such as meta programming, reflection, mobility, dynamic reconfigurability and distribution are becoming increasingly popular. All of these features are the domain of dynamic languages, and hence it is only logical that more dynamic language concepts have to be taken up by static languages, or that dynamic languages can make a breakthrough.

Currently, the dynamic language community is fragmented, split over a multitude of paradigms (from functional over logic to object-oriented), languages and syntaxes. This fragmentation severely hinders research as well as acceptance, and results in either language wars or, even worse, language ignorance. The goal of this symposium is to provide a highly visible, international forum for researchers working on dynamic features and languages. We explicitly invite submissions from all kinds of paradigms (object-oriented, functional, logic, ...), as can be seen from the structure of the program committee.

Areas of interests include, but are not limited to:
- closures
- delegation
- actors, active objects
- constraint systems
- mixins and traits
- reflection and meta-programming
- language symbiosis and multi-paradigm languages
- experience reports on successful application of dynamic languages

Accepted Papers will be published in the ACM Digital Library.


------------------------------- Submission Guidelines -------------------------------

Papers will need to be submitted using an online tracking system, of which the URL will be given later.

All papers must be submitted electronically in PDF format (or PostScript, if you do not have access to PDF-producing programs, but this is not recommended). Submissions, as well as final versions, must be formatted to conform to ACM Proceedings requirements: Nine point font on ten point baseline, two columns per page, each column 3.33 inches wide by 9 inches tall, with a column gutter of 0.33 inches, etc. See the ACM Proceedings Guidelines. You can save preparation time by using one of the templates from that page. Note that MS Word documents must be converted to PDF before being submitted.

----------------------
 Important Dates
----------------------

- Deadline for receipt of submissions: June 24th 2005
- Notification of acceptance or rejection: August 5th 2005
- Final version for the proceedings: To be announced later

---------------------------
Program Committee
---------------------------

- Gilad Bracha
- Wolfgang De Meuter
- Stephane Ducasse
- Gopal Gupta
- Robert Hirschfeld
- Dan Ingalls
- Yukihiro Matsumoto
- Mark Miller
- Eliot Miranda
- Philippe Mougin
- Oscar Nierstrasz
- Dave Thomas
- David Ungar
- Guido Van Rossum
- Peter Van Roy
- Jon L White (G)
- Roel Wuyts (Chair)


--
Roel Wuyts DeComp
[EMAIL PROTECTED] Universit� Libre de Bruxelles
http://homepages.ulb.ac.be/~rowuyts/ Belgique
Vice-President of the European Smalltalk Users Group: www.esug.org
--- End Message ---
--- Begin Message ---
Hi,

I have about 200 records in a table, and I need to update 2 of the
fields.  The first is easy, but the second contains a list of keywords
all separated by spaces; I need to replace the spaces with commas.  Is
this something I can do with some clever SQL, or shall I just do it in
PHP?

Any ideas appreciated

Cheers,
-- 
Will   The Corridor of Uncertainty   http://www.cricket.mailliw.com/
 - Sanity is a madness put to good use -

--- End Message ---
--- Begin Message ---
On 17 Apr 2005 W Luke wrote:

> I have about 200 records in a table, and I need to update 2 of the
> fields.  The first is easy, but the second contains a list of keywords
> all separated by spaces; I need to replace the spaces with commas.  Is
> this something I can do with some clever SQL, or shall I just do it in
> PHP?

Well I have not used this function, but it looks like it would do what 
you want (this is from MySQL):

    REPLACE(str,from_str,to_str) 

    Returns the string str with all all occurrences of the string
    from_str replaced by the string to_str

So for example:

        REPLACE(field, ' ', ',');

In other words, how about a query like this:

        UPDATE table SET field=REPLACE(field, ' ', ',');

I have not tried using a function in an UPDATE statement like this but 
you can test it and see, I would expect it to work.

In PHP you can do the same thing -- load the data with the mysql_ 
functions, then:

        $newval = str_replace(' ', ',', $oldval);

then use UPDATE to put $newval back into the database.

--
Tom

--- End Message ---
--- Begin Message ---
On 4/17/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> > I have about 200 records in a table, and I need to update 2 of the
> > fields.  The first is easy, but the second contains a list of keywords
> > all separated by spaces; I need to replace the spaces with commas.  Is
> > this something I can do with some clever SQL, or shall I just do it in
> > PHP?
> 
> Well I have not used this function, but it looks like it would do what
> you want (this is from MySQL):
> 
>     REPLACE(str,from_str,to_str)

Now why didn't I think of that?  Easy as pie - thanks Tom, working
like a charm...
-- 
Will   The Corridor of Uncertainty   http://www.cricket.mailliw.com/
 - Sanity is a madness put to good use -

--- End Message ---
--- Begin Message --- Hi!
I regularly need to insert data into MySQL.. and instead of writing Insert query everytime i wrote this function... and it works well..

Please see and tell is it a good idea using this..or there might be problems with it?

function  db_query($sql) {

        global $dbh;

        $result = mysql_query($sql,$dbh) or die(mysql_error());

        return $result;

}

function insertArray($table, $array)
{
//var_dump($array);
$sql1="INSERT INTO `".$table."`(";
$sql2=") VALUES(";

while (list($key,$value) = each($array)) {

//echo ("$key, $value <BR>");
$sql1=$sql1."`".$key."`,";
$sql2=$sql2."\"".$value."\",";
}
$sql1=rtrim($sql1,",");
$sql2=rtrim($sql2,",");
$sql=$sql1.$sql2.")";
//echo $sql;
db_query($sql);
}

And when i need to insert any data I create it as an array like below and call function:

$fields=array(
"Title" => $Title,
"OwnerMemberId" => $memberid,
"Address" => $Address,
"City" => $City,
"State" => $State,
"Pin" => $Pin
);

insertArray("Property", $fields);

where Property is the table name
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/

--- End Message ---
--- Begin Message --- I've read from php.net/setcookie and codecomments.com that using localhost won't work with cookies and neither are IP addresses. So how do I test cookies on local system?
--- End Message ---

Reply via email to