php - Check if a field in a certain row and column is empty -


i have database table consisting of columns player1, player2, player3... player12

i need check if column player1 empty in row.

here's have in join.php:

<?php require 'connect.inc.php'; $playername = $_get['name']; $tour_name = $_get['tourname'];  if (isset($playername)&&     isset($tour_name)) { $query = "select `tour_name` `tournies` `tour_name` = '$tour_name'"; $query_run = mysql_query($query);  echo mysql_error(); //mysql_query("update `tournies` set player1='".$playername."' tour_name='".$tour_name."'"); if ($query_run = mysql_query($query)) {     header('location: s.php');     } else {     echo 'not win.';     echo mysql_error();     }     } else { echo 'invalid username or tournament id, please return <a href="index.php">home</a> , try again. sorry.'; } ?> 

if need find if row empty, need use statement <> '' load rows values or = '' load empty rows; ex. select tour_name tournies tour_name = '';


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -