no I did a select * from database then filter out what i need through the
conditions..... like if I search for all sysads or all females or all
phone numbers.... I want to add more..... 

the example in devshed has something like this

<html>
<body>

<?php

mysql_connect (database, www);

mysql_select_db (example);

if ($first_name == "")
{$first_name = '%';}

if ($last_name == "")
{$last_name = '%';}


$result = mysql_query ("SELECT * FROM example
                         WHERE first_name LIKE '$first_name%'
                         AND last_name LIKE '$last_name%'
                       ");

if ($row = mysql_fetch_array($result)) {

do {
  print $row["first_name"];
  print (" ");
  print $row["last_name"];
  print ("<p>");
} while($row = mysql_fetch_array($result));

} else {print "Sorry, no records were found!";}

?>

</body>
</html>



Here's a nickel, kid. Get yourself a better computer. 
-- Dilbert.

On Thu, 26 Oct 2000, Raymond wrote:

> At 03:37 PM 10/26/00 +0800, you wrote:
> 
> ># how do you do a multiple query in mysql?
> >#
> ># mysql_query ("SELECT * FROM databasename ......
> ># ..... WHERE AND OR?
> >#
> ># I have this database via web but I don't know how to get more than 2
> ># entries the example on devshed only has firstname and last name.  what if
> ># i would like to add more like address or sex or email addy.? please help
> ># thanks.
> >
> >         SELECT <Field> FROM <TableName> WHERE (<Condition>) and (<Condition>)
> >
> >         ex. SELECT fname,lastname,email FROM UserName,UserInfo WHERE 
> > fname="sysad"
> >
> >         is this what you're asking for?
> >
> >jackson
> 
> 
> or:
> 
> select <field1>,<field2>,<field3>,.... from <tablename>;
> 
> raymond
> 
> 
> _
> Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
> 


_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to