Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
app.post('/api/products', function (req, res){ | |
var product; | |
console.log("POST: "); | |
console.log(req.body); | |
product = new ProductModel({ | |
title: req.body.title, | |
description: req.body.description, | |
style: req.body.style, | |
}); | |
product.save(function (err) { |
@Override | |
public void onActivityResult(int requestCode, int resultCode, Intent data) { | |
// TODO Auto-generated method stub | |
super.onActivityResult(requestCode, resultCode, data); | |
if (resultCode == Activity.RESULT_OK) { | |
File f = new File(Environment.getExternalStorageDirectory() | |
.toString()); | |
for (File temp : f.listFiles()) { | |
if (temp.getName().equals("temp.jpg")) { | |
f = temp; |
package com.ame.armymax; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import android.app.Activity; | |
import android.app.ProgressDialog; |
package com.ame.armymax.service; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import android.app.ProgressDialog; | |
import android.content.Context; |
function SK_getVideosWithPPV($query,$numL = 0,$numM = 8,$sort='N'){ | |
global $dbConnect; | |
$sql = ''; | |
if(!empty($query)){ | |
$query = SK_secureEncode($query); | |
$sql = "AND b.youtube_title LIKE '%".$query."%'"; | |
}else{ | |
$sql = ""; | |
} | |
//A |
<br /> | |
<b>Warning</b>: pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR: could not open file "/home/asset/public_html/motorway_dev/admin/upload/143098701295.csv" for reading: No such file or directory in <b>/home/asset/public_html/motorway_dev/_db.php</b> on line <b>38</b><br /> | |
<br /> | |
<b>Warning</b>: rename(/home/asset/public_html/motorway_dev/admin/upload/143098701295.csv,/home/asset/public_html/motorway_dev/admin/upload/history/143098701295.csv) [<a href='function.rename'>function.rename</a>]: No such file or directory in <b>/home/asset/public_html/motorway_dev/admin/run_db/run.php</b> on line <b>152</b><br /> | |
{"status":"S01"} |
MIIJJwIBAAKCAgEAtrFKqrK8uvThnjbZG4f89Umm/e2RfCq6bFmaYFXu3zpVMdVY | |
HEek5AitBVdjqCtVTjwvn24oPz+9rpxm+jmDxyPXKXWeCdFstrrRLKBzp6kPAc9w | |
dWECYIqCYoMecdGU+kNjhLEvEn8xn4F2VB66xn0oKuaik6zXy4/Tr4kKOX90YUt4 | |
utVpjJ10TZMdLtPfuqCuQe2fJT0O4WAkudh4uQXdtJ+BPqtspInF9dtIAfNbupTd | |
a+z5JEimHBqt+QORABcHdjq6Q32O44eZRin/NZBwUQ56RHIZQkq/T8f2cCB1AQAI | |
HTq6iqTrugAlZLV9n4syZiS1wfn6b2aEdkeJ8CK3LG0BlIpSJqv9EdqYFuS+0lo/ | |
fccoTE4485D87Ig1Tj/hZO666EGuekhwxl1nK6QV5q14l+S8RhAoR9GmWlZNVk37 | |
vB0tl0ZzTvOpFJlgKAcsgGqxGFqtbHzhevOXUg3LRl6krfieWiB0BTJtvoCA8+6U | |
gOrxF8lByuusFT51odHBe4UjfRTLQNuPWzci03+/n/3UQlN5Wn59sdqIK5UPbRH5 | |
GJUORe/zAX9MyS/5vNsN5+8GXDaYbjYHvEAWHXyK+VwY0TVnEzty75u05e3I2sC0 |
function getLastChatHistory($user_id, $friend_id, $message_size, $message_page, $conversation_id,$sort) | |
{ | |
//DB Connection | |
$db2 = dbConnect(); | |
$output = array(); | |
//Header | |
$user_info = getUserDetails($user_id); | |
$friend_info = getUserDetails($friend_id); |
'use strict'; | |
//Dep | |
var request = require('request'); | |
push("aaa",400,3,6,"",null); | |
// Chat Notifcation | |
function push( message, messageType, senderId, receiverId, data, all ) { | |
var unreadCount = 0; |