boogyman
05-29-2007, 03:47 PM
I created a customized query to search through my database for a given range of numbers, however when I do it the general way it cannot execute
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE ref_number=DD%");
-or-
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE ref_number LIKE DD%");
however if I change the query to search for 1 document by the ID, it will execute correctly.
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE doc_id=680");
is this a possible INDEXing problem?
Note: doc_id is the primary key of the table, and ref_number indexed :| or so I thought
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE ref_number=DD%");
-or-
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE ref_number LIKE DD%");
however if I change the query to search for 1 document by the ID, it will execute correctly.
$query = mysqli_query($conn, "SELECT doc_id,ref_number,title,description FROM docs WHERE doc_id=680");
is this a possible INDEXing problem?
Note: doc_id is the primary key of the table, and ref_number indexed :| or so I thought