• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP throwSQLError函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中throwSQLError函数的典型用法代码示例。如果您正苦于以下问题:PHP throwSQLError函数的具体用法?PHP throwSQLError怎么用?PHP throwSQLError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了throwSQLError函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: Copyright

<?php

/*
Copyright (C)

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
$connection = @mssql_connect($_SESSION['datasource_name'], $_SESSION['datasource_username'], $_SESSION['datasource_password']) or die(throwSQLError('general connection failure to the database'));
if (!empty($_GET['dbname'])) {
    $db = urldecode($_GET['dbname']);
    mssql_select_db($db);
    $_SESSION['database'] = $db;
}
开发者ID:noikiy,项目名称:vsuninpay,代码行数:25,代码来源:dbconnect.php


示例2: mssql_select_db

				<td align="center" style="background: #D0DCE0">
					<input type="submit" value="Run Query">
				</td>
			</tr>
		</table>
		</form>

		<script language="javascript">
			document.form1.query.focus();
		</script>
<?php 
if ($_POST['query'] == '') {
    include 'inc/footer.php';
}
mssql_select_db($_SESSION['database']);
$data_query = @mssql_query($_POST['query']) or die(throwSQLError('unable to complete query'));
echo '<table width="' . $_SETTINGS['mobilescreenwidth'] . '" cellpadding="2" cellspacing="0" style="border: 1px solid">';
$toggle = true;
$colors = array('#DDDDDD', '#CCCCCC');
$isempty = true;
$fields = array();
if (mssql_num_rows($data_query) > 0) {
    while ($row = mssql_fetch_array($data_query)) {
        if ($isempty) {
            $isempty = false;
        }
        if ($toggle) {
            $bg = $colors[0];
        } else {
            $bg = $colors[1];
        }
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:procedure_execute.php


示例3: or

under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
mssql_select_db($_SESSION['database']);
$data_query = @mssql_query('sp_helptext \'' . urldecode($_GET['procedure']) . '\'') or die(throwSQLError('unable to retrieve procedure'));
if (!@mssql_num_rows($data_query)) {
    $schema_query = @mssql_query('SELECT SPECIFIC_SCHEMA FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_NAME = \'' . urldecode($_GET['procedure']) . '\';');
    if ($schema_query) {
        $schema_array = mssql_fetch_array($schema_query);
        if ($schema_array['SPECIFIC_SCHEMA'] != 'dbo') {
            $_GET['procedure'] = $schema_array['SPECIFIC_SCHEMA'] . '.' . urldecode($_GET['procedure']);
        }
    }
}
@mssql_query('DROP PROCEDURE ' . urldecode($_GET['procedure']) . ';') or die(throwSQLError('unable to delete procedure'));
if (empty($_GET['returnto'])) {
    $_GET['returnto'] = 'database_properties.php';
}
echo '<meta http-equiv="refresh" content="0;url=' . $_GET['returnto'] . '">';
include 'inc/footer.php';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:procedure_drop.php


示例4: or

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
$db_info_query = @mssql_query('sp_helpdb') or die(throwSQLError('unable to retrieve databases'));
$dbinfo = array();
while ($row = mssql_fetch_array($db_info_query)) {
    if (!in_array($row['name'], $_SETTINGS['dbexclude'])) {
        $dbinfo[] = $row['name'] . ':' . number_format($row['db_size'], 2);
    }
}
?>

<table width="90%">
	<tr>
		<td align="left" valign="top" width="45%">
			<form name="form1" method="post" action="database_create.php?step=1">
			<table cellpadding="5" cellspacing="0" width="100%" style="border: 1px solid; border-color: black">
				<tr>
					<td align="center" colspan="2" style="background: #D0DCE0; border-bottom: 1px solid">
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:home.php


示例5: mssql_select_db

any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
mssql_select_db($_SESSION['database']);
if (!empty($_POST['query'])) {
    if (!@mssql_query($_POST['query'])) {
        throwSQLError('unable to create trigger');
    } else {
        echo '<meta http-equiv="refresh" content="0;url=database_properties.php">';
        include 'inc/footer.php';
    }
} else {
    $_POST['query'] = 'CREATE TRIGGER NewTrig;';
}
?>
		<form name="form1" method="post" action="trigger_create.php">
		<table cellpadding="3" cellspacing="3" style="border: 1px solid">
			<tr>
				<td align="center" style="background: #D0DCE0">
					<b>Create Trigger</b>
				</td>
			</tr>
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:trigger_create.php


示例6: array

			<b>Triggers</b>
		</td>
	</tr>
	<tr>
		<td style="background: #D0DCE0">&nbsp;</td>
		<td align="center" style="background: #D0DCE0">
			<b>Name</b>
		</td>
		<td align="center" colspan="2" style="background: #D0DCE0">
			<b>Action</b>
		</td>
	</tr>
	<?php 
$toggle = true;
$colors = array('#DDDDDD', '#CCCCCC');
$trig_query = @mssql_query('sp_helptrigger \'' . urldecode($_GET['table']) . '\'') or die(throwSQLError('unable to retrieve list of stored procedures'));
while ($row = mssql_fetch_assoc($trig_query)) {
    if ($row['trigger_schema'] != '') {
        $fullname = $row['trigger_schema'] . '.' . $row['trigger_name'];
    } else {
        $fullname = $row['trigger_name'];
    }
    if ($toggle) {
        $bg = $colors[0];
    } else {
        $bg = $colors[1];
    }
    $toggle = !$toggle;
    echo '<tr>';
    echo '<td align="center" style="background: ' . $bg . '" nowrap><input type="checkbox" name="triggers[]" value="' . $fullname . '"></td>';
    echo '<td style="background: ' . $bg . '" nowrap>' . $row['trigger_name'] . '</td>';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:trigger_list.php


示例7: die

    @mssql_query($query) or die(throwSQLError('unable to lock database', $query));
    $query = 'ALTER DATABASE ' . urldecode($_GET[dbname]) . ' SET READ_ONLY';
    @mssql_query($query) or die(throwSQLError('unable to make database READ-ONLY', $query));
    $query = 'ALTER DATABASE ' . urldecode($_GET[dbname]) . ' SET MULTI_USER';
    @mssql_query($query) or die(throwSQLError('unable to re-enable mutli-user mode on database', $query));
    echo '<meta http-equiv="refresh" content="0;url=home.php">';
} else {
    if ($confirm == 'readwrite') {
        $_SESSION['database'] = 'master';
        mssql_select_db('master');
        $query = 'ALTER DATABASE ' . urldecode($_GET[dbname]) . ' SET SINGLE_USER';
        @mssql_query($query) or die(throwSQLError('unable to lock database', $query));
        $query = 'ALTER DATABASE ' . urldecode($_GET[dbname]) . ' SET READ_WRITE';
        @mssql_query($query) or die(throwSQLError('unable to make database READ-WRITE', $query));
        $query = 'ALTER DATABASE ' . urldecode($_GET[dbname]) . ' SET MULTI_USER';
        @mssql_query($query) or die(throwSQLError('unable to re-enable mutli-user mode on database', $query));
        echo '<meta http-equiv="refresh" content="0;url=home.php">';
    } else {
        $status_query = @mssql_query('sp_helpdb') or die(throwError('unable to retrive database information'));
        while ($row = mssql_fetch_array($status_query)) {
            if ($row['name'] == $_GET['dbname']) {
                $status = explode(', ', $row['status']);
                foreach ($status as $value) {
                    $split = explode('=', $value);
                    if ($split[0] == 'Updateability') {
                        if ($split[1] == 'READ_WRITE') {
                            $newmode = 'READ_ONLY';
                        } else {
                            $newmode = 'READ_WRITE';
                        }
                    }
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:database_mode.php


示例8: Copyright

/*
Copyright (C)

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
@mssql_select_db($_SESSION['database']) or die(throwSQLError('unable to select database'));
if ($_POST['tables'][0] == '') {
    @mssql_query('DROP TABLE ' . urldecode($_GET['table']) . ';') or die(throwSQLError('unable to complete drop'));
} else {
    for ($counter = 0; $counter < count($_POST['tables']); $counter++) {
        @mssql_query('DROP TABLE ' . urldecode($_POST['tables'][$counter]) . ';') or die(throwSQLError('unable to complete drop'));
    }
}
if ($_SESSION['expanded'] != '') {
    echo '<script language="javascript">parent.left.location.reload();</script>';
}
echo '<meta http-equiv="refresh" content="0;url=database_properties.php?dbname=' . urlencode($_SESSION['database']) . '">';
include 'inc/footer.php';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:table_drop.php


示例9: throwSQLError

     $colquery = 'sp_columns @table_name = N\'' . $tablesep[0] . '\'';
 }
 $column_query = @mssql_query($colquery) or throwSQLError('unable to retrieve column data');
 while ($row = mssql_fetch_array($column_query)) {
     if (substr_count($row['TYPE_NAME'], 'identity') > 0) {
         $idcol = $row['COLUMN_NAME'];
     }
 }
 // END IDENTITY ISOLATION CODE
 if (substr($query, -6) == ' WHERE') {
     $query = substr($query, 0, -6);
 }
 if (!empty($_POST['orderbyfield'])) {
     $query .= ' ORDER BY ' . $_POST['orderbyfield'] . ' ' . $_POST['orderbyorder'];
 }
 $data_query = @mssql_query($query) or throwSQLError('unable to complete query', $query);
 if ($data_query) {
     echo '<table width="300" cellpadding="3" cellspacing="3" style="border: 1px solid">';
     $toggle = true;
     $colors = array('#DDDDDD', '#CCCCCC');
     $isempty = true;
     $fields = array();
     while ($row = mssql_fetch_array($data_query)) {
         if ($isempty) {
             $isempty = false;
         }
         if ($toggle) {
             $bg = $colors[0];
         } else {
             $bg = $colors[1];
         }
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:table_querybuilder.php


示例10: mssql_select_db

more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
if (!empty($_POST['confirm'])) {
    $confirm = $_POST['confirm'];
} else {
    $confirm = '';
}
if ($confirm == 'detach') {
    $_SESSION['database'] = 'master';
    mssql_select_db('master');
    $result = @mssql_query('sp_detach_db \'' . urldecode($_POST[dbname]) . '\',\'false\'') or die(throwSQLError('unable to detach database'));
    if ($result) {
        echo '<script language="javascript">parent.left.location.reload();</script>';
        echo '<meta http-equiv="refresh" content="0;url=home.php">';
    }
} else {
    ?>

<form name="form1" method="post" action="database_detach.php?dbname=<?php 
    echo $_GET['dbname'];
    ?>
">
<input type="hidden" name="dbname" value="<?php 
    echo $_GET['dbname'];
    ?>
">
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:database_detach.php


示例11: die

with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
@mssql_select_db($_SESSION['database']) or die(throwSQLError('unable to select database'));
if ($_GET['showall'] != 'yes') {
    if (substr_count(urldecode($_GET['table']), '.') > 0) {
        $data_query = @mssql_query('SELECT TOP 100 * FROM ' . urldecode($_GET['table'])) or die(throwSQLError('unable to complete query'));
    } else {
        $data_query = @mssql_query('SELECT TOP 100 * FROM [' . urldecode($_GET['table']) . ']') or die(throwSQLError('unable to complete query'));
    }
} else {
    if (substr_count(urldecode($_GET['table']), '.') > 0) {
        $data_query = @mssql_query('SELECT * FROM ' . urldecode($_GET['table'])) or die(throwSQLError('unable to complete query'));
    } else {
        $data_query = @mssql_query('SELECT * FROM [' . urldecode($_GET['table']) . ']') or die(throwSQLError('unable to complete query'));
    }
}
echo '<table width="' . $_SETTINGS['mobilescreenwidth'] . '" cellpadding="2" cellspacing="0" style="border: 1px solid">';
$toggle = true;
$colors = array('#DDDDDD', '#CCCCCC');
$isempty = true;
$fields = array();
while ($row = mssql_fetch_array($data_query)) {
    if ($isempty) {
        $isempty = false;
    }
    if ($toggle) {
        $bg = $colors[0];
    } else {
        $bg = $colors[1];
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:table_browse.php


示例12: mssql_select_db

any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
mssql_select_db($_SESSION['database']);
if (!empty($_POST['query'])) {
    if (!@mssql_query($_POST['query'])) {
        throwSQLError('unable to create procedure');
    } else {
        echo '<meta http-equiv="refresh" content="0;url=database_properties.php">';
    }
} else {
    $_POST['query'] = 'CREATE PROCEDURE NewProc;';
}
?>
		<form name="form1" method="post" action="procedure_create.php">
		<table cellpadding="3" cellspacing="3" style="border: 1px solid">
			<tr>
				<td align="center" style="background: #D0DCE0">
					<b>Create Stored Procedure</b>
				</td>
			</tr>
			<tr>
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:procedure_create.php


示例13: die

59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
?>

<?php 
include 'inc/header.php';
if (empty($_POST['mdf'])) {
    $result = @mssql_query('CREATE DATABASE ' . $_POST['dbname']) or die(throwSQLError('unable to create database'));
} else {
    if (substr_count($_POST['mdf'], '\\') == 0 || substr_count($_POST['ldf'], '\\') == 0 && $_POST['ldf'] != '') {
        mssql_select_db('master');
        $path_query = @mssql_query('sp_helpfile') or die(throwSQLError('unable to retrieve file path'));
        $path_array = mssql_fetch_array($path_query);
        if (substr_count($_POST['mdf'], '\\') == 0) {
            $_POST['mdf'] = substr($path_array['filename'], 0, strrpos($path_array['filename'], '\\')) . $_POST['mdf'];
        }
        if (substr_count($_POST['ldf'], '\\') == 0) {
            $_POST['ldf'] = substr($path_array['filename'], 0, strrpos($path_array['filename'], '\\')) . $_POST['ldf'];
        }
    }
    if ($_POST['ldf'] == '') {
        $result = @mssql_query('sp_attach_single_file_db \'' . $_POST['dbname'] . '\',\'' . $_POST['mdf'] . '\'') or die(throwSQLError('unable to attach database'));
    } else {
        $result = @mssql_query('sp_attach_db \'' . $_POST['dbname'] . '\',\'' . $_POST['mdf'] . '\',\'' . $_POST['ldf'] . '\'') or die(throwSQLError('unable to attach database'));
    }
}
if ($result) {
    echo '<script language="javascript">parent.left.location.reload();</script>';
    echo '<meta http-equiv="refresh" content="0;url=database_properties.php?dbname=' . $_POST['dbname'] . '">';
}
include 'inc/footer.php';
开发者ID:tttbug,项目名称:test,代码行数:31,代码来源:database_create.php


示例14: die

    $data_query = @mssql_query($_POST['query']) or die(throwSQLError('unable to save view'));
    if ($data_query) {
        throwSuccess('view saved');
    }
} else {
    mssql_select_db($_SESSION['database']);
    $lines = array();
    $doit = false;
    $data_query = @mssql_query('sp_helptext \'' . urldecode($_GET['view']) . '\'') or die(throwSQLError('unable to retrieve procedure'));
    if (!@mssql_num_rows($data_query)) {
        $schema_query = @mssql_query('SELECT TABLE_SCHEMA FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = \'' . urldecode($_GET['view']) . '\';');
        if ($schema_query) {
            $schema_array = mssql_fetch_array($schema_query);
            $_GET['view'] = $schema_array['TABLE_SCHEMA'] . '.' . urldecode($_GET['view']);
            unset($data_query);
            $data_query = @mssql_query('sp_helptext \'' . $_GET['view'] . '\'') or die(throwSQLError('unable to retrieve view'));
            if (@mssql_num_rows($data_query)) {
                $doit = true;
            }
        }
    } else {
        $doit = true;
    }
    if ($doit) {
        while ($row = mssql_fetch_array($data_query)) {
            $lines[] = $row['Text'];
        }
    } else {
        $lines[] = 'I am unable to read this view.';
    }
}
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:view_modify.php


示例15: Copyright

/*
Copyright (C)

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
@mssql_select_db($_SESSION['database']) or die(throwSQLError('unable to select database'));
if (empty($_POST['tablecount'])) {
    @mssql_query('DELETE FROM ' . urldecode($_GET['table']) . ';') or die(throwSQLError('unable to complete empty'));
} else {
    for ($counter = 0; $counter < $_POST['tablecount']; $counter++) {
        if ($_POST['tables'][$counter] == 'yes') {
            @mssql_query('DELETE FROM ' . urldecode($_POST['tables'][$counter]) . ';') or die(throwSQLError('unable to complete empty'));
        }
    }
}
echo '<meta http-equiv="refresh" content="0;url=database_properties.php?dbname=' . urlencode($_SESSION['database']) . '">';
include 'inc/footer.php';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:30,代码来源:table_empty.php


示例16: mssql_select_db

any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
if (!empty($_POST['newname'])) {
    mssql_select_db($_SESSION['database']);
    $query = 'sp_rename \'' . $_POST['oldname'] . '\', \'' . $_POST['newname'] . '\'';
    $result = @mssql_query($query) or throwSQLError('unable to renable table', $query);
    if ($result) {
        echo '<script language="javascript">parent.left.location.reload();</script>';
        echo '<meta http-equiv="refresh" content="0;url=database_properties.php">';
        exit;
    }
} else {
    ?>

<form name="form1" method="post" action="table_rename.php">
<input type="hidden" name="oldname" value="<?php 
    echo urldecode($_GET['table']);
    ?>
">
<table cellpadding="3" cellspacing="3" width="300" style="border: 1px solid">
	<tr>
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:table_rename.php


示例17: die

    $_SESSION['expanded'] = 'yes';
} else {
    $expand = '';
    $_SESSION['expanded'] = 'no';
}
$db_query = @mssql_query('sp_databases') or die(throwSQLError('unable to retrieve a list of databases'));
while ($row = mssql_fetch_array($db_query)) {
    if (!in_array($row['DATABASE_NAME'], $_SETTINGS['dbexclude'])) {
        $encoded = urlencode($row['DATABASE_NAME']);
        if ($expand != $encoded) {
            echo '<a href="menu.php?expand=' . $encoded . '">+</a>&nbsp;<a href="database_properties.php?dbname=' . $encoded . '" oncontextmenu="javascript:genDBLink(\'' . $encoded . '\');return(false);" target="right">' . $row['DATABASE_NAME'] . '</a><br>';
        } else {
            echo '<a href="menu.php">+</a>&nbsp;<a href="database_properties.php?dbname=' . $encoded . '" oncontextmenu="javascript:genDBLink(\'' . $encoded . '\');return(false);" target="right">' . $row['DATABASE_NAME'] . '</a><br>';
            $_SESSION['database'] = $row['DATABASE_NAME'];
            @mssql_select_db($row['DATABASE_NAME']) or die(throwSQLError('unable to select database'));
            $table_query = @mssql_query('sp_tables') or die(throwSQLError('unable to retrieve a list of tables'));
            while ($row2 = mssql_fetch_array($table_query)) {
                if ($row2['TABLE_TYPE'] == 'TABLE' && $row2['TABLE_NAME'] != 'dtproperties' || $_SETTINGS['showsysdata']) {
                    if ($row2['TABLE_OWNER'] != 'dbo') {
                        $row2['TABLE_NAME'] = $row2['TABLE_OWNER'] . '.' . $row2['TABLE_NAME'];
                    }
                    echo '&nbsp;&nbsp;&nbsp;-&nbsp;<font size="-1"><a href="table_properties.php?table=' . urlencode($row2['TABLE_NAME']) . '&dbname=' . $_GET['expand'] . '" oncontextmenu="javascript:genTableLink(\'' . urlencode($row2['TABLE_NAME']) . '\',\'' . $_GET['expand'] . '\');return(false);" target="right">' . $row2['TABLE_NAME'] . '</a></font><br>';
                }
            }
        }
    }
}
?>

</body>
</html>
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:menu.php


示例18: or

Software Foundation; either version 2 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
include 'inc/header.php';
mssql_select_db($_SESSION['database']);
$doit = false;
$data_query = @mssql_query('sp_helptext \'' . urldecode($_GET['view']) . '\'') or die(throwSQLError('unable to retrieve procedure'));
if (!@mssql_num_rows($data_query)) {
    $schema_query = @mssql_query('SELECT TABLE_SCHEMA FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = \'' . urldecode($_GET['view']) . '\';');
    if ($schema_query) {
        $schema_array = mssql_fetch_array($schema_query);
        if ($schema_array['TABLE_SCHEMA'] != 'dbo') {
            $_GET['view'] = $schema_array['TABLE_SCHEMA'] . '.' . urldecode($_GET['view']);
        }
    }
}
@mssql_query('DROP VIEW ' . urldecode($_GET['view']) . ';') or die(throwSQLError('unable to delete procedure'));
if ($_GET['returnto'] == '') {
    $_GET['returnto'] = 'database_properties.php';
}
echo '<meta http-equiv="refresh" content="0;url=' . $_GET['returnto'] . '">';
include 'inc/footer.php';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:view_drop.php


示例19: throwSuccess

    if ($data_query) {
        throwSuccess('procedure saved');
    }
    $lines = explode("\n", $_POST['query']);
} else {
    mssql_select_db($_SESSION['database']);
    $lines = array();
    $doit = false;
    $data_query = @mssql_query('sp_helptext \'' . urldecode($_GET['procedure']) . '\'') or die(throwSQLError('unable to retrieve procedure'));
    if (!@mssql_num_rows($data_query)) {
        $schema_query = @mssql_query('SELECT SPECIFIC_SCHEMA FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_NAME = \'' . urldecode($_GET['procedure']) . '\';');
        if ($schema_query) {
            $schema_array = mssql_fetch_array($schema_query);
            $_GET['procedure'] = $schema_array['SPECIFIC_SCHEMA'] . '.' . urldecode($_GET['procedure']);
            unset($data_query);
            $data_query = @mssql_query('sp_helptext \'' . $_GET['procedure'] . '\'') or die(throwSQLError('unable to retrieve procedure'));
            if (@mssql_num_rows($data_query)) {
                $doit = true;
            }
        }
    } else {
        $doit = true;
    }
    if ($doit) {
        while ($row = mssql_fetch_array($data_query)) {
            $lines[] = str_replace('CREATE', 'ALTER', $row['Text']);
        }
    } else {
        $lines[] = 'I am unable to read this stored procedure.';
    }
}
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:procedure_modify.php


示例20: die

document.form1.delimiter.focus();
</script>

<?php 
} else {
    @mssql_select_db($_SESSION['database']) or die(throwSQLError('unable to select database'));
    if ($_POST['fieldquote'] == 'single') {
        $quote = '\'';
    } else {
        $quote = '"';
    }
    echo '<form name="form1" method="post" action="table_export_download.php">';
    echo '<textarea name="data" rows="30" cols="75">';
    $tablecount = count($_POST['tables']);
    for ($counter = 0; $counter < $tablecount; $counter++) {
        $table_query = @mssql_query('SELECT * FROM ' . $_POST['tables'][$counter] . ';') or die(throwSQLError('unable to retrieve table data'));
        while ($row = mssql_fetch_array($table_query)) {
            if (!isset($schema)) {
                $schema = array();
                foreach ($row as $key => $value) {
                    if (!is_int($key)) {
                        $schema[] = $key;
                    }
                }
            }
            $values = array();
            foreach ($schema as $col) {
                if ($quote == '\'') {
                    $values[] = '\'' . str_replace('\'', '\'\'', $row[$col]) . '\'';
                } else {
                    $values[] = '"' . $row[$col] . '"';
开发者ID:noikiy,项目名称:vsuninpay,代码行数:31,代码来源:table_export.php



注:本文中的throwSQLError函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP throw_404函数代码示例发布时间:2022-05-23
下一篇:
PHP throwException函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap