mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
modify sql queries so we dont select all of the profile fields
This commit is contained in:
1 parent
04ada722f5
commit
e8ea4a8951
2 files changed
+4
-4
No files matched your search
@@ -41,8 +41,6 @@ export const TwitterApp = () => {
|
|||||||
const [activePage, setActivePage] = useState(0);
|
const [activePage, setActivePage] = useState(0);
|
||||||
const { profile } = useProfile();
|
const { profile } = useProfile();
|
||||||
|
|
||||||
console.log(profile);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
Nui.send("phone:getOrCreateTwitterProfile", {});
|
Nui.send("phone:getOrCreateTwitterProfile", {});
|
||||||
Nui.send("phone:fetchTweets", {});
|
Nui.send("phone:fetchTweets", {});
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ end)
|
|||||||
function fetchAllTweets(cb)
|
function fetchAllTweets(cb)
|
||||||
MySQL.Async.fetchAll([[
|
MySQL.Async.fetchAll([[
|
||||||
SELECT
|
SELECT
|
||||||
|
npwd_twitter_profiles.profile_name,
|
||||||
|
npwd_twitter_profiles.avatar_url,
|
||||||
npwd_twitter_tweets.*,
|
npwd_twitter_tweets.*,
|
||||||
npwd_twitter_profiles.*,
|
|
||||||
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
|
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
|
||||||
FROM npwd_twitter_tweets
|
FROM npwd_twitter_tweets
|
||||||
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier
|
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier
|
||||||
@@ -26,8 +27,9 @@ function fetchTweetsFiltered(searchValue, cb)
|
|||||||
local searchValueParameterized = '%' .. searchValue .. '%'
|
local searchValueParameterized = '%' .. searchValue .. '%'
|
||||||
MySQL.Async.fetchAll([[
|
MySQL.Async.fetchAll([[
|
||||||
SELECT
|
SELECT
|
||||||
|
npwd_twitter_profiles.profile_name,
|
||||||
|
npwd_twitter_profiles.avatar_url,
|
||||||
npwd_twitter_tweets.*,
|
npwd_twitter_tweets.*,
|
||||||
npwd_twitter_profiles.*,
|
|
||||||
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
|
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
|
||||||
FROM npwd_twitter_tweets
|
FROM npwd_twitter_tweets
|
||||||
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier
|
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier
|
||||||
|
|||||||
Reference in new issue
Block a user