Hi Chris,
Thanks for the pointer :) I found some other interesting reference and ideas
on using this in the manual. Now I just need to provide some error checking
in case $_GET['menu'] isn't defined in the URL (that should be pretty
straight fwd) and in case it is defined, but a corresponding imag
At 21:55 13-3-2003, you wrote:
mod.php?mod=userpage&menu=215&page_id=xxx
mod.php?mod=userpage&menu=20001&page_id=xxx
mod.php?mod=site_map&menu=20010
And would want all the following pages to load an image named something like
foo_1.jgp
mod.php?mod=userpage&menu=1&page_id=xxx
submit.php&menu=100
mo
RTFM...
http://www.mysql.com/doc/en/Pattern_matching.html
Håkan wrote:
I'm trying to make a small and simple search function, but it only works for
exact searches, and I can't figure out how to make a wildcard search, if I
do it in the php or in the mysql_query, can't really find anything about
You'll do it in the database, not PHP.
Look into using LIKE in your query...
SELECT * FROM yourtable WHERE column LIKE '%searchterm%'
The % characters are wildcards that'll match any amount of characters.
You can use _ to match a single character.
You could also look at FULL-TEXT indexing in M
That's because this is a MySQL-specific question and you should be reading
the MySQL documentation or asking on the MySQL list.
-Rasmus
On Mon, 11 Nov 2002, Håkan wrote:
> I'm trying to make a small and simple search function, but it only works for
> exact searches, and I can't figure out how to
> If you're only executing one-liners and get all the
> results back you're
> better off using shell_exec(). popen() lets you open
> a pipe to a
> command--that way, you can funnel data to it as if
> you were typing from the keyboard.
That's what I'll do then: use shell_exec().
> Permissions wou
If you're only executing one-liners and get all the results back you're
better off using shell_exec(). popen() lets you open a pipe to a
command--that way, you can funnel data to it as if you were typing from
the keyboard.
Permissions would be a problem with readdir() as well.
Marco
--
<>
These are fine. I'm not going to use Windows for a
server. Won't the same problem in relation to
directory permissions stop me even if I just did a
simple readdir()? The only one I'm too worried about
is the safe mode thing. It works for now, though. The
next server I'm moving to will hopefully
Mako Shark wrote...
> Didn't know of shell_exec() until now. It works, though. Thanks!
>
> Is there any reason why it wouldn't work? If I changed servers, say, and there
> were some ports blocked and etc. etc., is there a risk that I should know?
My understanding is that many security-conscious
Well, as a general rule, it won't work if you're not using a UNIX o/s or
if PHP has been set up with safe mode on, or if you don't have the right
permission to see that folder. That's probably a non-inclusive list, but
there should be ways around each of these problems (depending on the
degree of c
<<$a = explode (' ', shell_exec ("ls $foldername/*.html"));>>
Didn't know of shell_exec() until now. It works, though. Thanks!
Is there any reason why it wouldn't work? If I changed servers, say, and there were
some ports blocked and etc. etc., is there a risk that I should know?
--
> -Original Message-
> From: Mako Shark [mailto:phpman2000@;yahoo.com]
> do I have to do a
> readdir() and read the filename of every file until I find an
> HTML or until all files have been read.
This is what the shell expression supplied by Marco Tabini actually does;
doing it in PHP (re
How about:
$a = explode (' ', shell_exec ("ls $foldername/*.html"));
This should return an array that contains the name of all the *.html
files in the folder $foldername, if any.
Hope this helps.
Cheers,
Marco
-
php|architect -- The Monthly Magazine For PHP Professionals
Come vi
Cesar,
Yes, its:
select * from table_name where col1 like '%' and col2 like '%' and col3
like '%';
As your default is %, then this is easy.
Its all in the mysql manual, Section 6.3.2.1 String Comparison Functions.
HTH
Chris
César Aracena wrote:
>Hi all.
>
>I'm trying to figure out how to do
>As I believe I mentioned before, I use PHP and MySQL to keep a journal.
>all the entries are accessed by /index.phtml?id=23 , where "23" is
>replaced by the id of the entry you want.
>A "problem" I'm having is that some search engines' spiders (google, >most
>notably), won't navigate through
15 matches
Mail list logo