Categories
Snaps
Search
Register
Contact
API
publish and unpublic joomla function
Joomla public
<?php function publish($cid = array(), $publish = 1) { if (count( $cid )) { $cids = implode( ',', $cid ); $query = 'UPDATE #__table' . ' SET published = ' . intval( $publish ) . ' WHERE id IN ( '.$cids.' )'; $this->_db->setQuery( $query ); if (!$this->_db->query()) { $this->setError($this->_db->getErrorMsg()); return false; } } return true; } ?>
Usage
copy to model
Comments
Add your comment
Search
Login
Coder: babyskill
View more snaps from babyskill
View babyskill's profile
Rate this snap
Rating:
0
/ 5 (
0
votes) 1002 views
Custom class generator
Selected snaps:
None selected yet.
Hot PHP snaps
PHP image slideshow auto
PHP pagination class
Bootstrap PHP code
Clean URL
PHP ffmpeg Upload Script
Rijndael 256 bit encryption using mcrypt
generate a preview image from an FLV file on-the-fly, or to save
Median calculator
Partners
PHP Site
PHPSnips
Comments