LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
var mysql = require('mysql');
var fs = require('fs');
var _ = require('lodash');

var express = require('express');
var app = express();

var con = mysql.createConnection({
  host: "chimein-aurora.c0ypmmoz6v8u.us-west-2.rds.amazonaws.com",
  user: "root",
  password: "rhbZhsUaVq8it9",
  database: "chimein-test"
});

var k;

con.connect(function(err) {
  if (err) throw err;


// var sql = "SELECT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_uuid,p.post_status,p.post_caption,p.post_feed_uuid,p.post_created_date FROM feed f,post p WHERE p.post_feed_uuid = (SELECT DISTINCT f.feed_uuid FROM feed) GROUP BY f.feed_uuid";
var sql = "SELECT DISTINCT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_feed_uuid FROM feed f,post p WHERE p.post_feed_uuid = f.feed_uuid GROUP BY f.feed_uuid";

var postObj = {
  feed_uuid : 2,
}

var result2 = postObj;
var postArr = [];
var newArr = [];
var allPosts = [];
var postTable = [];
var newTable =[];

    con.query(sql, function (err, result) {	
    for (var i=0; i {
	res.setHeader('Access-Control-Allow-Origin','*');
	res.send(k);
	
});
app.listen(3002);
CSS
var mysql = require('mysql');
var fs = require('fs');
var _ = require('lodash');

var express = require('express');
var app = express();

var con = mysql.createConnection({
  host: "chimein-aurora.c0ypmmoz6v8u.us-west-2.rds.amazonaws.com",
  user: "root",
  password: "rhbZhsUaVq8it9",
  database: "chimein-test"
});

var k;

con.connect(function(err) {
  if (err) throw err;


// var sql = "SELECT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_uuid,p.post_status,p.post_caption,p.post_feed_uuid,p.post_created_date FROM feed f,post p WHERE p.post_feed_uuid = (SELECT DISTINCT f.feed_uuid FROM feed) GROUP BY f.feed_uuid";
var sql = "SELECT DISTINCT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_feed_uuid FROM feed f,post p WHERE p.post_feed_uuid = f.feed_uuid GROUP BY f.feed_uuid";

var postObj = {
  feed_uuid : 2,
}

var result2 = postObj;
var postArr = [];
var newArr = [];
var allPosts = [];
var postTable = [{ "post_uuid":1, "post_status":1, "post_caption":1,"post_created_date":1  }];
var newTable =[];

    con.query(sql, function (err, result) {	
    for (var i=0; i {
	res.setHeader('Access-Control-Allow-Origin','*');
	res.send(k);
	 
});
app.listen(3002);
JS
var mysql = require('mysql');
var fs = require('fs');
var _ = require('lodash');

var express = require('express');
var app = express();

var con = mysql.createConnection({
  host: "chimein-aurora.c0ypmmoz6v8u.us-west-2.rds.amazonaws.com",
  user: "root",
  password: "rhbZhsUaVq8it9",
  database: "chimein-test"
});

var k;

// var sql = "SELECT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_uuid,p.post_status,p.post_caption,p.post_feed_uuid,p.post_created_date FROM feed f,post p WHERE p.post_feed_uuid = (SELECT DISTINCT f.feed_uuid FROM feed) GROUP BY f.feed_uuid";
var sql = "SELECT DISTINCT f.feed_uuid,f.feed_status,f.feed_start_date,p.post_feed_uuid FROM feed f,post p WHERE p.post_feed_uuid = f.feed_uuid GROUP BY f.feed_uuid";

var postObj = {
  feed_uuid : 2,
}

var result2 = postObj;
var postArr = [];
var newArr = [];
var allPosts = [];
var postTable = [{ "post_uuid":1, "post_status":1, "post_caption":1,"post_created_date":1  }];
var newTable =[];

con.connect(function(err) {
  if (err) throw err;




    con.query(sql, function (err, result) {	
    for (var i=0; i {
	res.setHeader('Access-Control-Allow-Origin','*');
	res.send(k);
	 
});
app.listen(3002);
Term
Wed, 12/27/2017 - 06:59

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv