
Search In
Hooks are the functions that we can call before and after doing any task in Models ( database related ). Like after finding data, before saving data etc.
e.g beforeSave(), afterSave(), beforeFind(), afterFind() etc.
<?php
class Classname extends
This how you can can print the query with parameters generated by db_select() .
print strtr((string) $query, $query->arguments());
die; //Stop execution here and show me the query
make sure you print it before query e
Prepared statement is used to execute same database statements repeatedly with high performance. For example, if you want to insert multiple employee records you can use same prepared statement again and again.
For below illustration it is assumed
All the work and tasks are done in the cache in on_change context. Therefore so you dont need to be worried for altering database as the recordSet will be able to altred inside your function. That’s the main difference with @api.depends.
For e
With the help of call method we have to create xmlrpc/2/object, it is used to call methods of odoo models and send value in database.
For example you can see below code and use in your odoo module.
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'
Hello Friends,
Programmer generally need last insert id for their coding requirement. If you are new in Wordpress and you need to fetch last insert id after insertion. Please follow the code below:
// Define the DB object
global $wpdb;
// Define
Hello Friends
If you are looking to update records in Codelgniter. Please follow the code for the same:
// Define the array with your db attribute as key and your updated data as value
$data = array(
'country_name' => $countryName,
Hello all,
I dont know what im doing wrong, i only want to check the username and password in the database if they exist show, you are logged in but if they do not exist to show.. you have no access to db
public void logIn(Student student) {
Migrations has very important role in Laravel 4.x. By using Migrations we can create and update our database and by using Migration we can save time because it will create schema by using single command.
Migrations Creation:
In Laravel 4.x Migratio
We can easily auto-load libraries in Laravel 4.x by using namespaces in our application. Then put all libraries you code under that namespace.
Suppose our directory structure would then be:
libraries
Myapp
Search (note directory is capi