my code is this
for($i=0;$i<=$count_number_of;$i++){
$checklist_pass= mysql_query("SELECT *
FROM pase_res WHERE (pas_dep_flight='$flight_list_no' and pas_dep_status='B' and pas_dep_board_seq='$i') or ( pas_rtn_flight='$flight_list_no'and pas_rtn_status='B' and pas_rtn_board_seq='$i')")or die(mysql_error());
}
what's wrong
no errors comming variables and other datafiels are right
problem is under this sql some records are not comming
SQL
Moderator: General Moderators
-
prasadharischandra
- Forum Commoner
- Posts: 57
- Joined: Thu May 09, 2002 2:19 am
- Location: sri lanka
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Since I do not have access to your data and have no idea about your table layout it makes it difficult to say what would be wrong with the SQL statement if it is syntactically correct - that is that it does not cause any errors. I would suggest that you do this:
To check that the right variables are being passed.
Mac
Code: Select all
$sql = "SELECT * FROM pase_res WHERE (pas_dep_flight='$flight_list_no' and pas_dep_status='B' and pas_dep_board_seq='$i') or ( pas_rtn_flight='$flight_list_no'and pas_rtn_status='B' and pas_rtn_board_seq='$i')";
echo $sql;
$checklist_pass= mysql_query($sql) or die(mysql_error());Mac