What will happen if this code is mistaken? What to do with it

Source: Internet
Author: User
What will happen if this code is mistaken?
The first is right. The second is wrong, with no bean number between fields
What happens if you do it in the second way?

The first type:
{
$r = $empire->fetch1 ("select id,ddd,aaa,bbb from {$dbtbpre}ecms_". $class _r[$classid][tbname]. "Where id= ' $id ' and Classid= ' $classid ' limit 5 ');
if ($r [id])
{
?>
document.write (' ', ' ', ' ');

}
}
Else
{
?>
document.write (' Login to view ');
}
Db_close ();
$empire =null;
?>

The second type:
{
$r = $empire->fetch1 ("Select Id,ddd aaa bbb from {$dbtbpre}ecms_". $class _r[$classid][tbname]. "Where id= ' $id ' and Classid= ' $classid ' limit 5 ');
if ($r [id])
{
?>
document.write (' ', ' ', ' ');

}
}
Else
{
?>
document.write (' Login to view ');
}
Db_close ();
$empire =null;
?>

Where DDD AAA BBB is the controlled field

------Solution--------------------
It doesn't matter!
Depends on different databases
------Solution--------------------
Nothing, it could be wrong. May be seen as an alias
------Solution--------------------
discuss

It doesn't matter!
Depends on different databases

------Solution--------------------
Select ID,DDD AAA BBB This situation can go wrong.
Select ID,DDD AAA treats AAA as a DDD alias
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.