[PHP-DB] Re: searching through a string

2006-09-18 Thread Kae Verens

Ron Piggott (PHP) wrote:

If $file_name includes the path
/path/to/file/file_name.pdf
is there anyway of searching from the right hand side to the left and
getting the file name out the $file_name variable?  The file name starts
the character following the last /


this should do it.
$filename=preg_replace('/.*\//','',$filename);

Kae

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Searching a name field

2003-11-06 Thread Chris Berlioz
Yes you have to break this up into fields that hold your Firstname,
MI,Lastname.  This has so many advantages, using PHP string function to
query inside fields might be useful somewhere else, I wouldn't recommend it
for use in a large DB.  Divide and conquer!

Espero este consejo te sirva, ese error es muy comun, mucha gente quiere
guardar nombres completos porque simplifican asi la forma que el usuario
llena, bad practice I would say.

Christian.

===


"Manuel Ochoa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> I currently manage a MySQL database with about 3 records. I've given
my users the ability to search the name field by pattern.
>
> For example, the name field can hold 36 characters and contains first
name, middle initial and last name. example:
>
> NAME
> John D Miller Jr.
> Harry B Davis
> Angela De La Cruz
>
> Users can search for "Miller" or "B Davis" or "a De La"
>
> Our company is getting ready to purchase a database with 20 million
records. I've been told that this type of reach will take too long and that
I need to parse out the name field into First name, MI, Last name and
suffix. Then allow users to search by first name or last name or both.
>
> Is this true? Do I need to parse out the name into different fields? Is
there any way to do a pattern search and do it efficiently inside of 1 name
field?
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Searching DB and Printing Results

2003-01-02 Thread David Eisenhart
This may be of use:
http://www.mysql.com/doc/en/Fulltext_Search.html

D.


"Mike Delorme" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
>
>
> Hi,
>
> I have a table in DB Music that looks a little mike this:
>
> TABLE NAME
> _
>  SONG NAMESONG LYRICS
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |   | |  |
> |___| |__|
>
> In each row of SONG NAME is the name of a song and the corisponding lyrics
> are in the next colum. What I would like to do is set up a search in wich
> the client can enter a sequence of words. The search searches the DB table
> TABLE NAME and looks for the word sequence in the table. The printed
results
> are the song name and a link to the lyrics. Can this be done? And how can
it
> be done?
>
> Thanks,
> Michael Delorme
> www.HybridFusion.com
>
> _
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Searching for Datagrid

2002-09-24 Thread John Lim


"Paolo Zani" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All!
> I'm searching for Datagrid component for php and mysql. Something like
java
> ones.
> Does anyone knows one?
>
> Thanks
> Paolo
>
>

Have a look at http://phplens.com/ It's a commercial software component.

Regards, John



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Searching...

2002-07-18 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> in ym search page, i construct a sql query from user input to search my
> database, and i run this query to get totalresults. Then run another query
> with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per
> page. My question is, is this inefficient? is there any better way i dont
> know of? or does the 2 queries not mka emuch of a difference
> 

You might consider running the first query just to get a COUNT(), rather 
than extracting all the resulting rows and using mysql_numrows to 
determine how many were returned

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Searching within a Text document

2002-02-09 Thread Todd Williamsen

Here is the code I have tried... but no luck

$kw has been found in the resume of

$LastName, $FirstName http://madden.williamsen.net/recruiter/resumes/$filename\";>Resume
";
}
else {
echo "The keyword $kw was not found in the resume
$filename";
}
  }

fclose($fd);

?>
"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I go about doing this..  I tried to search within a MS Word
> document, but that didn't work too well, since Word is not ASCII
formatted,
> but on the other hand, I wasn't able to search a text document created in
> notepad or exported from word to a text file.
>
> Anyway how to do this?
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

I did get a reply regarding searching Word documents, and one person
said that if Word uses an ASCII format, then use the regex function..
She tried it, and it worked..so who knows!

Now I got to figure out how to use it... geez

-Original Message-
From: Shrock, Court [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:51 PM
To: 'DL Neil'; Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: Searching Documents


If "running" meant at the process level and not just installed, then
word
does not have to be running.COM creates the appropriate instances of
whatever is requested via COM.  But yes, Word does have to be installed.

However, wonder what the wine project could afford this discussion?
Maybe
you could do it on a 'nix afterall?!

> -Original Message-
> I assume if you are setting up a dynamic connection to Word,
> Word will have to be running - which almost implies
> a Windows box.
>
> Whether the COM component/add-on to PHP (also?) demands a
> Windows box, I can't say.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court

If "running" meant at the process level and not just installed, then word
does not have to be running.COM creates the appropriate instances of
whatever is requested via COM.  But yes, Word does have to be installed.

However, wonder what the wine project could afford this discussion?  Maybe
you could do it on a 'nix afterall?!

> -Original Message-
> I assume if you are setting up a dynamic connection to Word, 
> Word will have to be running - which almost implies
> a Windows box.
> 
> Whether the COM component/add-on to PHP (also?) demands a 
> Windows box, I can't say.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread DL Neil

Todd,

> Now, if I do COM with PHP, then does this need to be on a Windows
> server?  Currently it sits on a Linux box.

I assume if you are setting up a dynamic connection to Word, Word will have to be 
running - which almost implies
a Windows box.

Whether the COM component/add-on to PHP (also?) demands a Windows box, I can't say.

Regards,
=dn



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

DL

Sounds cool!!  Get to work!  LOL!

Well, as soon as I get some idea what the hell I will be doing I will
start it, and I will keep you guys informed on it if you like.  For DL's
app, it would be the opposite, but same method, but backwards, right?

-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 1:33 PM
To: Shrock, Court; 'Todd Williamsen'
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Searching Documents


Court, Todd, et al

> Actually, PHP does COM very wellsearch the PHP-WIN list about
"COM" and
> "Word" and you should find some good hints and examples to get going.
I
> haven't accessed the keywords portion of a word document yet, but
someone
> wrote a spellcheck function that used the spellcheck built into Word
using
> PHP COM.  There is also a really helpful article at phpbuilder.com
that gets
> you started with COM.  If you have trouble finding them, I could
forward
> some messages to you from that list.

> -Original Message-
> I was thinking COM/DCOM, but then does PHP able to do that?  Or do I
> need to resort to ASP(Awful Scripting Pages)?



Thanks for that comment Court. I have seen the entries in the PHP manual
- and possibly one or two of those
articles (but not yet studied them - so many PHP info sources/ideas but
so little time!).

The spell-check exploit caught my eye - a good way to make use of a
well-established (and if you use if
frequently - a well invested) tool.

Unlike Todd's application (getting data out of Word) I was thinking of
going the 'other way' (yes there's always
one!). HTML/browsers are good for showing information on the screen -
whether a data-entry type of form, or a
web page or descriptive/narrative information (eg a PHPbuilder article).
However when you want to print the data
out, browsers are pretty basic!

So I was wondering about extending the idea of constructing web
documents from a db/on the fly for display in a
browser, to going the next step and reproducing the same doc in (say)
Word (using its
presentation/printing/formatting features), so that the doc can be
presented with natty facilities, eg
page/chapter headings/footings, page numbers, chapters and table of
contents, cover page(s), indexes/indices,
etc - 'camera ready'!

Anyone seen it done?
=dn




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread DL Neil

Court, Todd, et al

> Actually, PHP does COM very wellsearch the PHP-WIN list about "COM" and
> "Word" and you should find some good hints and examples to get going.  I
> haven't accessed the keywords portion of a word document yet, but someone
> wrote a spellcheck function that used the spellcheck built into Word using
> PHP COM.  There is also a really helpful article at phpbuilder.com that gets
> you started with COM.  If you have trouble finding them, I could forward
> some messages to you from that list.

> -Original Message-
> I was thinking COM/DCOM, but then does PHP able to do that?  Or do I
> need to resort to ASP(Awful Scripting Pages)?



Thanks for that comment Court. I have seen the entries in the PHP manual - and 
possibly one or two of those
articles (but not yet studied them - so many PHP info sources/ideas but so little 
time!).

The spell-check exploit caught my eye - a good way to make use of a well-established 
(and if you use if
frequently - a well invested) tool.

Unlike Todd's application (getting data out of Word) I was thinking of going the 
'other way' (yes there's always
one!). HTML/browsers are good for showing information on the screen - whether a 
data-entry type of form, or a
web page or descriptive/narrative information (eg a PHPbuilder article). However when 
you want to print the data
out, browsers are pretty basic!

So I was wondering about extending the idea of constructing web documents from a db/on 
the fly for display in a
browser, to going the next step and reproducing the same doc in (say) Word (using its
presentation/printing/formatting features), so that the doc can be presented with 
natty facilities, eg
page/chapter headings/footings, page numbers, chapters and table of contents, cover 
page(s), indexes/indices,
etc - 'camera ready'!

Anyone seen it done?
=dn



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

Well,

This application would eventually land on either Linux or Windows box, it
would be for internal use only, so it wouldn't get wacked too bad.  I know
IIS5 has a bunch of COM built-ins.

The problem of going to like a text based documents is that this is for
resume management and 99% of the resumes are in MS Word format, so thats the
reason why
"Court Shrock" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> correct to my knowledge.
>
> I am not sure even running ASP on a linux server would allow you to open
the
> word documents, as I think ASP uses COM to do the dirty work.
>
> of course, you could always do the world a favor and not use microsoft's
> proprietary file formats in any way.  an open standard will always be
easier
> and be able to reach the most people--even micorosft products can read
open
> standard documents, why shutoff the rest of the world to what you are
doing
> by using M$?
>
> glad to hear you are running linux, though, so you must already know most
of
> this :-)
>
> best of luck in your endeavors!
>
> court
>
> > -Original Message-
> > Now, if I do COM with PHP, then does this need to be on a Windows
> > server?  Currently it sits on a Linux box.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court

correct to my knowledge.

I am not sure even running ASP on a linux server would allow you to open the
word documents, as I think ASP uses COM to do the dirty work.

of course, you could always do the world a favor and not use microsoft's
proprietary file formats in any way.  an open standard will always be easier
and be able to reach the most people--even micorosft products can read open
standard documents, why shutoff the rest of the world to what you are doing
by using M$?

glad to hear you are running linux, though, so you must already know most of
this :-)

best of luck in your endeavors!

court

> -Original Message-
> Now, if I do COM with PHP, then does this need to be on a Windows
> server?  Currently it sits on a Linux box.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

Now, if I do COM with PHP, then does this need to be on a Windows
server?  Currently it sits on a Linux box.


-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:40 PM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Searching Documents


Todd,

> No one knows???

=or isn't telling?

> hmm...  I looked around on php.net couldn't find anything regarding
this..
> would I need to do these searches in MS Word docs with ASP?

=go ahead if you are aspidexterous...

=the Word document format is proprietary information - ie not 'open'. So
it is a 'bit much' expecting an open
system (PHP) to gain access! Try gaining access to words in a Word doc
from even Access!?

=What about PHP-COM/DCOM?
=dn


> > I was wondering if there is a way to search documents.
> >
> > Scenario:
> >
> > I have a application where it uploads MS Word documents to a server
and
> > holds the documents location in the database.  What I want is to be
able
> to
> > search those Word documents via keywords.
> >
> > Is this possible with PHP?
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court

Actually, PHP does COM very wellsearch the PHP-WIN list about "COM" and
"Word" and you should find some good hints and examples to get going.  I
haven't accessed the keywords portion of a word document yet, but someone
wrote a spellcheck function that used the spellcheck built into Word using
PHP COM.  There is also a really helpful article at phpbuilder.com that gets
you started with COM.  If you have trouble finding them, I could forward
some messages to you from that list.

Court

> -Original Message-
> I was thinking COM/DCOM, but then does PHP able to do that?  Or do I
> need to resort to ASP(Awful Scripting Pages)?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

Yes,

I was thinking COM/DCOM, but then does PHP able to do that?  Or do I
need to resort to ASP(Awful Scripting Pages)?

-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:40 PM
To: Todd Williamsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Searching Documents


Todd,

> No one knows???

=or isn't telling?

> hmm...  I looked around on php.net couldn't find anything regarding
this..
> would I need to do these searches in MS Word docs with ASP?

=go ahead if you are aspidexterous...

=the Word document format is proprietary information - ie not 'open'. So
it is a 'bit much' expecting an open
system (PHP) to gain access! Try gaining access to words in a Word doc
from even Access!?

=What about PHP-COM/DCOM?
=dn


> > I was wondering if there is a way to search documents.
> >
> > Scenario:
> >
> > I have a application where it uploads MS Word documents to a server
and
> > holds the documents location in the database.  What I want is to be
able
> to
> > search those Word documents via keywords.
> >
> > Is this possible with PHP?
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread DL Neil

Todd,

> No one knows???

=or isn't telling?

> hmm...  I looked around on php.net couldn't find anything regarding this..
> would I need to do these searches in MS Word docs with ASP?

=go ahead if you are aspidexterous...

=the Word document format is proprietary information - ie not 'open'. So it is a 'bit 
much' expecting an open
system (PHP) to gain access! Try gaining access to words in a Word doc from even 
Access!?

=What about PHP-COM/DCOM?
=dn


> > I was wondering if there is a way to search documents.
> >
> > Scenario:
> >
> > I have a application where it uploads MS Word documents to a server and
> > holds the documents location in the database.  What I want is to be able
> to
> > search those Word documents via keywords.
> >
> > Is this possible with PHP?
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Searching Documents

2002-02-08 Thread Todd Williamsen

No one knows???

hmm...  I looked around on php.net couldn't find anything regarding this..
would I need to do these searches in MS Word docs with ASP?


"Todd Williamsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I was wondering if there is a way to search documents.
>
> Scenario:
>
> I have a application where it uploads MS Word documents to a server and
> holds the documents location in the database.  What I want is to be able
to
> search those Word documents via keywords.
>
> Is this possible with PHP?
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Searching a table

2001-09-05 Thread Jacob Singh

Hello,

  Devon, Try the methos outlines in this article:
  http://phpbuilder.com/columns/clay19990421.php3

  The method is basically this:
  break up all your fields into one word chunks.
  insert into a search_table a chunk and it's corresponding
  ID of the row it came from.  It won't take boolean operations, but
  you could probably mod it to make it do it.  It is a nice design
  though because you can get a relevancy percentage thingy.  The only
  problem is that you have to run a maintenance script every day or
  hour to update the search terms.  The other option is of course the
  old OR field1 LIKE '%keyword%' OR field2 LIKE '%keyword', etc. etc.

-- 
Best regards,
 Jacob Singh
 Pajama Design 
 (413)582-9342
 2 Belanger Pl.
 Northampton, MA 01060

mailto:[EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: Searching a table

2001-09-05 Thread Marcus Tobias

Hi Devon!

Take a look in the function reference to mysql functions of PHP.
There are functions to connect to the mysql database and requesting
datas with SQL queries. You need knowlege on SQL to use it.
There are example too.

bye Marcus

"Devon" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a database in mysql that only has one table, that table has approx
25
> fields . I need to be able to search for data under each of these
> fields.
>
> Field examples:  Company, TechContact, AdminContact, Mobile etc etc
>
> I need I guess a pull down menu that would select a field (c above) then
be
> able to search under each field, as in search for company name, or mobile
> number etc etc.
>
> As of yet I cant get my search working ... does any one have any sample
code
> or any suggestion?  Any help would be amazing . if you have an answer
> post on here or write to me at work [EMAIL PROTECTED]
>
>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]