Jump to content

[SOLVED] Question about SELECT


cenarius

Recommended Posts

I wanna check if the value I am searching, exists in the database or not and then using if/else statement in PHP.

 

This is the SQL code inside the php code. The selection is stored in variable $existing

SELECT Player FROM Players
WHERE Player='$player'

 

$player is the value I am searching for (taken out of form).

 

 

The php part which is bothering me:

if ($existing == ?????)

 

What to put in there? What is the result if no match is found? FALSE? NULL?

 

 

MySql version: 5.0.81

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/167406-solved-question-about-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.