Re: [PHP-DB] db questions and newbie...

2002-08-25 Thread DL Neil
Matt, I've put this back on the list because other people are smarter than me/can reply more quickly! (and I hate people who pretend to have 'the answer' when they're plainly out of their depth/range of experience - so...) I don't think that I've managed to completely understand where you are

[PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread andy
Hi there, I am trying to write a php script to perform a full text search on a mysql db. I do a match against... and it digs out some results out of the db. There are 2 problems: 1. How can I restrict the results to e.g. 100 characters, but to make sure the keyword is within this 100

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread Stuart McDonald
Hi Andy, In answer to part two - here's a snippet of code I use to highlight relevant words in red - hope it helps to put you on the right track. for ($i=0; $i count($keywords); $i++) { $blurb = eregi_replace( .$keywords[$i]. , font color=\#FF\.$keywords[$i]./font , $blurb); } where

[PHP-DB] New to PHP mySQL

2002-08-25 Thread Ray Healy \(Data Net Services\)
Hi all (details of database at then end of this message) I hope someone can give me some advice. I am trying to create a database and access via PHP for a friend of mine that has a caravan park. What I want him to be able to do is to add bookings for the caravans via a PHP page and for clients

RE: [PHP-DB] New to PHP mySQL

2002-08-25 Thread Mark Middleton
The one thing I cannot get into my head is how can you tell the database that all the days between the start and end dates are booked. Also when people search for a caravan on a specific date and say they want it for 7 day the database/PHP checks to see if the entire period is totally free

[PHP-DB] OS X 10.2 and MySQL 3.23.51 Failures

2002-08-25 Thread Allens
Hello, I did a clean install of OS X 10.2 and clean installs of PHP, MYSQL. Tried both Marc Liynage and ServerLogics builds. When trying to launch mysql, I get the following errors at the command line: dyld: mysql Undefined symbols: mysql undefined reference to _BC expected to be defined in

[PHP-DB] Fwd: OS X 10.2 and MySQL 3.23.51 Failures

2002-08-25 Thread Allens
Hello again, Persistance pays off. Remember I'm pretty new at this, so be patient and kind please. I uninstalled the builds for MySQL, and PHP from Marc's versions. I reinstalled Marc's version from his website. Everything started working again. Marc's builds did work. Not sure about

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread andy
for ($i=0; $i count($keywords); $i++) { $blurb = eregi_replace( .$keywords[$i]. , font color=\#FF\.$keywords[$i]./font , $blurb); } Hello Stuart, great, thats a first success and works fast. There are just 2 things which fail on this function: 1. Problems with full stops. A word

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread DL Neil
andy, I find the PCRE regex option easier to work with. Herewith a solution which takes care of case (without changing the original text), and without regard to spaces or other characters (including the first and last characters of the string - which you didn't mention/identify as potential

[PHP-DB] Re: New to PHP mySQL

2002-08-25 Thread Dan Koken
Ray, Why not just simply give them a list of available times that meet their number of days requested starting with the day they ask for. Would look something like this. HTH. Dan. Have a great day. -- ? $req_start_date = '2002-04-01'; $req_end_date =

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread Stuart McDonald
Yeah I had the same problem - also with question marks, quotes etc - I couldn't figure out a fix for it - if you do - please lemme know! cheers stuart - Original Message - From: andy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 25, 2002 11:40 PM Subject: Re: [PHP-DB]

Re: [PHP-DB] full text search and how to underline keyword in results

2002-08-25 Thread Adam Royle
The first argument passed to eregi_replace is .$keywords[$i]. You are concatenating the string and a space on the end and front. This was obviously used as a hack to make sure only full words were highlighted. A fix for this? A simple hack would be to take out the spaces, so it is simply

RE: [PHP-DB] auto_increment problem???

2002-08-25 Thread Russ
Miles: Thanks for your input. I'm running MySQL 3.23.49-nt-log on php4.2.1. and the table in question is of type: MyISAM. I noticed that, upon returning to work Monday (today) I deleted * from the table and the auto_increment column reverted back to starting from one again. However, today I'm