Skip to main content
Participant
February 11, 2008
Question

DATAASSIST extension help needed

  • February 11, 2008
  • 2 replies
  • 531 views
I am using the Data Assist extension and need some help.
I am trying to do a search that looks at 2 columns.

Can anyone tell me why this script returns all records?

<?php
$maxRows_WADAALFL = 20;
$pageNum_WADAALFL = 0;
if (isset($_GET['pageNum_WADAALFL'])) {
$pageNum_WADAALFL = $_GET['pageNum_WADAALFL'];
}
$startRow_WADAALFL = $pageNum_WADAALFL * $maxRows_WADAALFL;

$ParamvisitorTeam_WADAALFL = "-1";
if (isset($_GET['S_homeTeam'])) {
$ParamvisitorTeam_WADAALFL = (get_magic_quotes_gpc()) ? $_GET['S_homeTeam'] : addslashes($_GET['S_homeTeam']);
}
$ParamhomeTeam_WADAALFL = "-1";
if (isset($_GET['S_homeTeam'])) {
$ParamhomeTeam_WADAALFL = (get_magic_quotes_gpc()) ? $_GET['S_homeTeam'] : addslashes($_GET['S_homeTeam']);
}
$Paramrainout_WADAALFL = "0";
if (isset($_GET['S_rainout'])) {
$Paramrainout_WADAALFL = (get_magic_quotes_gpc()) ? $_GET['S_rainout'] : addslashes($_GET['S_rainout']);
}
mysql_select_db($database_schedule, $schedule);
$query_WADAALFL = sprintf("SELECT * FROM ALFL WHERE (visitorTeam LIKE '%%%s%%' OR '-1' = '%s') OR (homeTeam LIKE '%%%s%%' OR '-1' = '%s') OR (rainout = %s OR '0' = '%s') ORDER BY ID ASC", $ParamvisitorTeam_WADAALFL,$ParamvisitorTeam_WADAALFL,$ParamhomeTeam_WADAALFL,$ParamhomeTeam_WADAALFL,$Paramrainout_WADAALFL,$Paramrainout_WADAALFL);
$query_limit_WADAALFL = sprintf("%s LIMIT %d, %d", $query_WADAALFL, $startRow_WADAALFL, $maxRows_WADAALFL);
$WADAALFL = mysql_query($query_limit_WADAALFL, $schedule) or die(mysql_error());
$row_WADAALFL = mysql_fetch_assoc($WADAALFL);

if (isset($_GET['totalRows_WADAALFL'])) {
$totalRows_WADAALFL = $_GET['totalRows_WADAALFL'];
} else {
$all_WADAALFL = mysql_query($query_WADAALFL);
$totalRows_WADAALFL = mysql_num_rows($all_WADAALFL);
}
$totalPages_WADAALFL = ceil($totalRows_WADAALFL/$maxRows_WADAALFL)-1;
?>
This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
February 20, 2008
haha




"WebAssist" <webforumsuser@macromedia.com> wrote in message
news:fpfal5$5d0$1@forums.macromedia.com...
> This is a question for the WebAssist forum. Go here:
> http://www.webassist.com:8119/ and see if anyone else has had a similar
> question.
> If not, post your question there and you are very likely to get a helpful
> response.
>


WebAssist
Participant
February 19, 2008
This is a question for the WebAssist forum. Go here: http://www.webassist.com:8119/ and see if anyone else has had a similar question.
If not, post your question there and you are very likely to get a helpful response.