Hi to all the group, I have a problem with a query using mysql
4.01+mysql+php
This is the form i use to get the data for the query:
<FORM method="post" action="http://www.ibtec.info/resbu.php">
<h1>Ingrese palabra a buscar</h1>
<INPUT type="text" name="ci">
<INPUT type="submit" value="Buscar"> <INPUT type="reset">
</FORM>
and here is the php i use
<?php
$ci=$_POST['ci'];
$link = mysql_connect("localhost", "myuser","mypassword");
mysql_select_db("ibtecin_pagina", $link);
$sql = "SELECT * FROM rubros having nombre like '%$ci%'";
$result = mysql_query($sql, $link);
echo "<table border = '0'> \n";
$row = mysql_fetch_row($result);
while ($row=mysql_fetch_row($result)){
echo "<tr><td>$row[1]</td></tr> \n";
}
echo "</table> \n";
?>
The problem is that if I use one char like for example "a" I get all
that match that criteria,that have that char, but if I want to narrow
the search with more tha one char , for example "aud", and in the table
there is one math "auditoria".
Hope someone can help me, sorry for my english
Regards
Marcelo
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]