user655334
user655334

Reputation: 1015

Check the blob(image) is existing or not using mysql/php

I get the blob data from mysql. And how to check the blob data is existing or not using php.

if (image exists)
{
  #Do some operation
}
else
{
  #Do some operation
}

Upvotes: 0

Views: 6040

Answers (1)

hsz
hsz

Reputation: 152266

Maybe just compare if fetched blob column is not null ?

if ( !empty( $row['blob_column'] ) ) {

}

Upvotes: 3

Related Questions