469,271 Members | 981 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

SQL Query Problem on Dynamic PHP Page (HELP!)

I'm having trouble with my SQL statement for a PHP/MYSQL page I am
creating. The search page is located at
http://dcavello.phenominet.com/alumn...umnisearch.php and the
results page at http://dcavello.phenominet.com/alumn...mniresults.php

Here is the code for the results page:

<?php require_once('../Connections/connAlumni.php');

mysql_select_db($database_connAlumni, $connAlumni);

$query = sprintf("SELECT s FROM tb_alumni WHERE %s LIKE
'%%%s%%'",$_POST['search'],$_POST['keyword']);

mysql_select_db($database_connAlumni, $connAlumni);
$rsAlumni = mysql_query($query, $connAlumni) or die(mysql_error());
$row_rsAlumni = mysql_fetch_assoc($rsAlumni);
$totalRows_rsAlumni = mysql_num_rows($rsAlumni);
?>

Can anyone direct me to where I might be going wrong? Thanks.
Ryan
--
To reply, please remove your robe.

Jul 19 '05 #1
0 1029

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ryan Sullivan | last post: by
5 posts views Thread by Mark | last post: by
3 posts views Thread by vodafone | last post: by
1 post views Thread by florencepushpa | last post: by
5 posts views Thread by ycquak | last post: by
1 post views Thread by braich | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.