How to check SQL script PHP code error, which we able to use echo to do this advantage.
instance:
echo $sql;
Create your own web site information, create domain, web host register, web programing, web promotion, e-commerce and example yahoo domain. Give our gift if you like just access link you like. Professional ERP, Open ERP, Odoo
New Hosting
ads auto
Saturday, June 26, 2010
Tuesday, June 22, 2010
Sunday, June 20, 2010
Limitation of header clause in PHP
Example:
...
if(a=b)
{
...
}
else
{
...
header("Location: admin_home.php");
}
?>
header need located at last clause of php code:
must not have space and other command
...
if(a=b)
{
...
}
else
{
...
header("Location: admin_home.php");
}
?>
header need located at last clause of php code:
must not have space and other command
Saturday, June 19, 2010
php where Clause
Pattern:
SELECT column_name(s)
FROM table_name
WHERE column_name operator value
PHP code Example:
$myquery= mysql_query("SELECT * FROM Persons
WHERE FirstName='John' ");
$result=mysql_query($myquery);
if(!$result)
{
$error = "Query fail!";
return($error);
}
Where Clause with variable
$myquery ="select * from userdb where user = '".$myuser."' and usepw= '".$mepw."' ";
this clause specific 2 variables those are:
$myuser => ' " .$myuser. " '
$mepw => ' " .$mepw. " '
Please Note: ' " .$myuser. " ' => must no space => should be '".$myuser."'
SELECT column_name(s)
FROM table_name
WHERE column_name operator value
PHP code Example:
$myquery= mysql_query("SELECT * FROM Persons
WHERE FirstName='John' ");
$result=mysql_query($myquery);
if(!$result)
{
$error = "Query fail!";
return($error);
}
Where Clause with variable
$myquery ="select * from userdb where user = '".$myuser."' and usepw= '".$mepw."' ";
this clause specific 2 variables those are:
$myuser => ' " .$myuser. " '
$mepw => ' " .$mepw. " '
Please Note: ' " .$myuser. " ' => must no space => should be '".$myuser."'
PHP Correct Web Date time
PHP code fix problem regarding time not correct
$metime = date("Y-m-d H:i:s", strtotime("+5 hours"));
PHP Check Server Time Zone
echo date_default_timezone_get();;
$metime = date("Y-m-d H:i:s", strtotime("+5 hours"));
PHP Check Server Time Zone
echo date_default_timezone_get();;
Wednesday, January 2, 2008
Cheap Web Host
Almost cheap host would provide us for Linux server, which those web host would give user free service for PHP and MySQL database.
Mention to those solution would give user got cheapest web hosting, so we need to learn more regarding PHP programing , MySQL scrip.
PHP is free scrip, which we able to build by editor program instance to Edit plus or Notepad.
Also for visual PHP programing instance Delphi PHP or Dreamweaver.
Delphi PHP most flexible for PHP coding.
Mention to Delphi PHP programing tip please follow link at right side.
Mention to those solution would give user got cheapest web hosting, so we need to learn more regarding PHP programing , MySQL scrip.
PHP is free scrip, which we able to build by editor program instance to Edit plus or Notepad.
Also for visual PHP programing instance Delphi PHP or Dreamweaver.
Delphi PHP most flexible for PHP coding.
Mention to Delphi PHP programing tip please follow link at right side.
Subscribe to:
Posts (Atom)