modify sql queries so we dont select all of the profile fields

This commit is contained in:
erik-sn committed 2020-10-04 10:30:59 -04:00
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 { profile } = useProfile();
console.log(profile);
useEffect(() => {
Nui.send("phone:getOrCreateTwitterProfile", {});
Nui.send("phone:fetchTweets", {});
+4 -2
View File
@@ -7,8 +7,9 @@ end)
function fetchAllTweets(cb)
MySQL.Async.fetchAll([[
SELECT
npwd_twitter_profiles.profile_name,
npwd_twitter_profiles.avatar_url,
npwd_twitter_tweets.*,
npwd_twitter_profiles.*,
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
FROM npwd_twitter_tweets
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 .. '%'
MySQL.Async.fetchAll([[
SELECT
npwd_twitter_profiles.profile_name,
npwd_twitter_profiles.avatar_url,
npwd_twitter_tweets.*,
npwd_twitter_profiles.*,
TIME_TO_SEC(TIMEDIFF( NOW(), npwd_twitter_tweets.createdAt)) AS seconds_since_tweet
FROM npwd_twitter_tweets
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier