mirror of
https://github.com/Mibew/design.git
synced 2025-01-23 02:20:34 +03:00
code cleanup
This commit is contained in:
parent
b9cc8ed5b1
commit
20bcf3c1f5
@ -25,7 +25,7 @@ require_once('dbinfo.php');
|
|||||||
|
|
||||||
function runsql($query, $link)
|
function runsql($query, $link)
|
||||||
{
|
{
|
||||||
$res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link));
|
$res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error());
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,14 +359,12 @@ function connect()
|
|||||||
|
|
||||||
function perform_query($query, $link)
|
function perform_query($query, $link)
|
||||||
{
|
{
|
||||||
mysql_query($query, $link)
|
mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
|
||||||
or die(' Query failed: ' . mysql_error($link) /*.": ".$query*/);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_one_row($query, $link)
|
function select_one_row($query, $link)
|
||||||
{
|
{
|
||||||
$result = mysql_query($query, $link) or die(' Query failed: ' .
|
$result = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
|
||||||
mysql_error($link) /*.": ".$query*/);
|
|
||||||
$line = mysql_fetch_array($result, MYSQL_ASSOC);
|
$line = mysql_fetch_array($result, MYSQL_ASSOC);
|
||||||
mysql_free_result($result);
|
mysql_free_result($result);
|
||||||
return $line;
|
return $line;
|
||||||
@ -374,8 +372,7 @@ function select_one_row($query, $link)
|
|||||||
|
|
||||||
function select_multi_assoc($query, $link)
|
function select_multi_assoc($query, $link)
|
||||||
{
|
{
|
||||||
$sqlresult = mysql_query($query, $link) or die(' Query failed: ' .
|
$sqlresult = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
|
||||||
mysql_error($link) /*.": ".$query*/);
|
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) {
|
while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user