简体   繁体   English

如何维护数据库中表中列数据的完整性

[英]How to maintain the integrity of the data from the columns in the tables in the database

I want to keep the character /r/n for "history" data and I don't want to omit the "/r/n" when displayed in the HTML.我想为“历史”数据保留字符/r/n并且我不想在 HTML 中显示时省略“/r/n”。

public function get3Tbl($id_siswa)
{
    return DB::table('tbl_siswa')
        ->join('tbl_mapel', 'tbl_siswa.id_mapel', '=', 'tbl_mapel.id_mapel')
        ->join('tbl_guru', 'tbl_siswa.id_guru', '=', 'tbl_guru.id_guru')
        ->join('tbl_wiki', 'tbl_siswa.id_wiki', '=', 'tbl_wiki.id_wiki')
        ->addSelect('nis')
        ->addSelect('nama_siswa')
        ->addSelect('tbl_mapel.mapel')
        ->addSelect('tbl_guru.nama_guru')
        ->addSelect('foto_siswa')
        ->addSelect('tbl_wiki.adaptasi')
        ->addSelect('tbl_wiki.total_eps')
        ->addSelect('tbl_wiki.thn_produksi')
        ->addSelect('tbl_wiki.history')
        ->addSelect('tbl_wiki.description_char')
        ->where('tbl_wiki.id_siswa', $id_siswa)
        ->first();
}

截屏

for not printing you can use {!!对于不打印,您可以使用 {!! $value !!} , it just print what ever is in the $value $value !!} ,它只是打印 $value 中的内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM