models/booksManager.php
// function for add a new book in my table
function for add a new book in my table
function for add a new book in my table
public function add($book)
	{
	    $request = $this -> db ->prepare('INSERT INTO books
	    	(Title, Author, ReleaseDate, Category, Summary) VALUES(:Title, :Author, :ReleaseDate, :Category, :Summary)');
	    $request -> execute(
	    	[
	    'Title' => $book -> getTitle(),
	    'Author' => $book -> getAuthor(),
	    'ReleaseDate' => $book -> getReleaseDate(),
	    'Category' => $book -> getCategory(),
	    'Summary' => $book -> getSummary(),
	    	]
	    );
	}
public function add ( $ book ) { $ request = $ this -> db -> prepare ( 'INSERT INTO books
	    	(Title, Author, ReleaseDate, Category, Summary) VALUES(:Title, :Author, :ReleaseDate, :Category, :Summary)' ) ; $ request -> execute ( [ 'Title' => $ book -> getTitle ( ) , 'Author' => $ book -> getAuthor ( ) , 'ReleaseDate' => $ book -> getReleaseDate ( ) , 'Category' => $ book -> getCategory ( ) , 'Summary' => $ book -> getSummary ( ) , ] ) ; }
function for add a new book in my table
function for add a new book in my table
// array