#21
Posted 25 February 2013 - 05:59 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#22
Posted 25 February 2013 - 06:53 PM
$sql = "SELECT * FROM follow LEFT JOIN needs ON follow.username=needs.needsusername ORDER BY needs.datetime";
$lookupposts = mysql_query($sql) or trigger_error("Query Failed! SQL: $sql - Error: ".mysql_error(), E_USER_ERROR);
while ($postrow = mysql_fetch_array($lookupposts)) {
$description = $postrow['needs.description'];
$needsusername = $postrow['needs.needsusername'];
$datesubmitted = $postrow['needs.datesubmitted'];
echo "<b>User:</b> $needsusername<br><br><b>Description:</b><br>$description<br><br><b>Date Submitted:</b> $datesubmitted<br><br>----------------------------------------<br><br>";
}
I didn't get an error but all it shows is
User:
Description:
Date Submitted:
but it doesn't show any info. stumped again. But I'm learning. Any direction?
#23
Posted 25 February 2013 - 06:55 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#24
Posted 25 February 2013 - 07:10 PM
For some reason it's showing my posts and the posts of one other user named "dvdowns" but not the posts of everyone I follow. It's strange.
#25
Posted 25 February 2013 - 07:21 PM
#26
Posted 25 February 2013 - 07:22 PM
In phpmyadmin or mysql command line run SELECT * FROM follow WHERE username = 'Put your username here'; - what do you get?
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#27
Posted 25 February 2013 - 07:25 PM
SELECT description, needsusername, datesubmitted FROM needs INNER JOIN follow ON follow.followname = needs.needsusername AND follow.username = 'Your username here';
Is what I think you'll need based on your posts.
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#28
Posted 25 February 2013 - 07:28 PM
Username Followname
derekshull dvdowns
derekshull ForgottenSong
derekshull test
derekshull owensinguatemala
#29
Posted 25 February 2013 - 07:30 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#30
Posted 25 February 2013 - 07:34 PM
Also to the snide comment you made earlier, remember you're the 26 year old that started the sarcastic comments. My employees appreciate your "help".
#31
Posted 25 February 2013 - 07:35 PM
#32
Posted 25 February 2013 - 07:39 PM
How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq
Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!
#33
Posted 25 February 2013 - 08:35 PM
I'm not going to hold your hand and write the code for you - ain't nobody got time for that!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












