• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] db validation & connection

Started by dtiberio,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dtiberioTopic starter

Anytime you make an SQL query to the database, you should check to make sure the database is still connected, and then reconnect if the connection drops. It will make the sql calls more reliable.

so you need a function to determine if the database is still connected, and another to reconnect if the connection is dropped. then place it right before every SQL statement.

function remove_activity($type, $obj, $extra =''){
global $db;
$db->query("delete from ".DB_PREFIX."activity where user ='".user_id()."' and type = '".toDb($type)."' and object = '".toDb($obj)."' and extra = '".toDb($extra)."'" );
}
  •  

PHPVibe A.

As I know ezSQL does this in the class, not 100% sure, but I'm having this impression.

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 45998

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 74411

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 56184

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 5024

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 26350

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 9502

video,playlist,images, etc. (frontend) select all deselect all reselect all

Started by spirog


Replies: 3
Views: 9184