may be the best solution is combination of A) and B)
check the length of the phrase if it is <=3 use B) (it will be damn slow
if you have great number of rows in 'news' table and/or 'content' is big
most of the times)
if it is > 3 use A)
B.R.
Ognyan
Monty wrote:
Hi,
My head is swimming with lots
I have a search form on a page that i am having trouble with. i can not seem to get
the search string correct. In the form i have firstname, lastname, homephone, and
email. I would like to upon search return data put in form. for example if i put
"john" in firstname i want all rows where firstn
Harmeet,
The field email is obviously a field that can accept strings. In SQL, you must wrap
strings in single-quotes. So, rewrite your query as:
$query = "SELECT id, email, familyname FROM members WHERE email='$thing'";
The reason it worked for id=$thing is that the id field is probably an i
I use PHP to check the search form's input fields then add them to the SQL
statement if they contain data. And if you want the search to return all
records from the table (let's hope there's not many then) if no search terms
are provided then make the "WHERE" part of your SQL query an option based
I'm trying to get PHP (for Windows) to talk to MS SQL Server. This
is proving to be non-trivial.
I downloaded and installed the Windows binary package on my machine
(the machine is running Microsfot Windows XP Professional), and
jumped through the hoops to get it running under Apache 2.0. So
fa
[EMAIL PROTECTED] wrote:
I'm trying to get PHP (for Windows) to talk to MS SQL Server. This
is proving to be non-trivial.
I downloaded and installed the Windows binary package on my machine
(the machine is running Microsfot Windows XP Professional), and
jumped through the hoops to get it runnin
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 23, 2004 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Getting PHP for Windows to talk to MS SQL?
>
> I'm trying to get PHP (for Windows) to talk to MS SQL Server.
> This is proving to
$sql_start = "SELECT * FROM table_name WHERE ";
If($_POST['first_name'] != '') {
$first_name = $_POST['first_name'];
$sql_start .= "first_name LIKE '%$first_name%' AND ";
}
If($_POST['last_name'] != '') {
$last_name = $_POST['last_name'];
$sql_start .= "last_name LIK
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tuesday 20 July 2004 13:16, \[php\]Walter wrote:
> > I have a mySQL DB running on an NT server.
>
> > $db_host = 'db.myserver.net';
>
> > Now, if I change $db_host to the machine IP, it works fine.
>
> If db.myserve
On Saturday 24 July 2004 10:25, \[php\]Walter wrote:
> So, your saying that if the name is in the HOSTS file and it still does not
> work I should not try anything further and just use the IP?
Does:
ping hostname.as.listed.in.hosts.file
correctly resolves to the IP address as listed in the HO
10 matches
Mail list logo