Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php virtual('/Connections/mainconnection.php'); ?>
- <?php
- if (!function_exists("GetSQLValueString")) {
- function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
- {
- if (PHP_VERSION < 6) {
- $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
- }
- $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
- switch ($theType) {
- case "text":
- $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
- break;
- case "long":
- case "int":
- $theValue = ($theValue != "") ? intval($theValue) : "NULL";
- break;
- case "double":
- $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
- break;
- case "date":
- $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
- break;
- case "defined":
- $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
- break;
- }
- return $theValue;
- }
- }
- mysql_select_db($database_mainconnection, $mainconnection);
- $query_mainchanel = "SELECT Userchanel.chanelur, Userchanel.embedded1, Userchanel.embedded2, Userchanel.genre, Userchanel.embeddedgame1, Userchanel.embeddedgame2, Userchanel.description, Userchanel.username FROM Userchanel;";
- $mainchanel = mysql_query($query_mainchanel, $mainconnection) or die(mysql_error());
- $row_mainchanel = mysql_fetch_assoc($mainchanel);
- $totalRows_mainchanel = mysql_num_rows($mainchanel);mysql_select_db($database_mainconnection, $mainconnection);
- $query_mainchanel = "SELECT Userchanel.chanelur, Userchanel.embedded1, Userchanel.embedded2, Userchanel.genre, Userchanel.embeddedgame1, Userchanel.embeddedgame2, Userchanel.description, Userchanel.username FROM Userchanel";
- $mainchanel = mysql_query($query_mainchanel, $mainconnection) or die(mysql_error());
- $row_mainchanel = mysql_fetch_assoc($mainchanel);
- $totalRows_mainchanel = mysql_num_rows($mainchanel);
- $query_mainchanel = "SELECT chanelur, embedded1, embedded2, genre, embeddedgame1, embeddedgame2, `description`, username FROM userchanel ORDER BY chanelur ASC";
- $mainchanel = mysql_query($query_mainchanel, $mainconnection) or die(mysql_error());
- $row_mainchanel = mysql_fetch_assoc($mainchanel);
- $totalRows_mainchanel = mysql_num_rows($mainchanel);
- $query_mainchanel = "SELECT chanelur, embedded1, embedded2, genre, embeddedgame1, embeddedgame2, `description`, username FROM userchanel";
- $mainchanel = mysql_query($query_mainchanel, $mainconnection) or die(mysql_error());
- $row_mainchanel = mysql_fetch_assoc($mainchanel);
- $totalRows_mainchanel = mysql_num_rows($mainchanel);
- mysql_free_result($mainchanel);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement