Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
Did you actually close your entire browser, all tabs, all windows?
-
Specify what columns you join on. If you're going to use table aliases make them make sense. a and b are meaningless. You also should be using a primary key ID instead of the username. Username should only be stored in the user table, everything else should use their user id. You are running one query to get a user, and then selecting the information for that ONE USER. You need to do just ONE query joining the two tables only limiting it to the logged in user, not BOTH users.
-
... Google "mysql join"
-
Never do queries in loops. Join the two tables, and use an ORDER BY clause.
-
Writing a text editor : Unbold the bold text
Jessica replied to netpumber's topic in Javascript Help
The same way you add them, but in reverse. I'd do it in jQuery if I were doing it. -
That doesn't change our rules. You're not special. Double posting is not allowed. If you were not able to get help for this in three months it's not going to happen now just because you post a 5th thread for it.
-
If you're using their API you shouldn't need to copy their profile photo to your own site.
-
You've made multiple threads for this. Stop double posting.
-
Writing a text editor : Unbold the bold text
Jessica replied to netpumber's topic in Javascript Help
You'd have to insert spans around the letters you want to change. You should consider using an existing tool like TinyMCE. No need to reinvent the wheel when it's a really complicated wheel and every road has different rules. -
WAMP server won't go online: Help
Jessica replied to talk2toyin's topic in Other Web Server Software
I don't know that you can run IIS and WAMP at the same time. Try picking just one. -
Facebook has an API. If you want your users to login with Facebook credentials, you can then get their profile photo. A lot of sites do use Facebook for login.
-
Sounds like Facebook blocked your script which violates their tos.
-
I'd add to Barand's way to add a column specifically called 'order_by' or something, so you can easily change the order - this is vital when you ADD a new value and need it to go between two existing values.
-
I'd be pretty annoyed if I could only be logged in on one of my 5 devices at a time, I'm constantly going back and forth from my PC to laptop to phone to view PHPfreaks. If I had to login again each time I'd stop using the site.
-
Wait are you saying you actually stored the results of a var_dump into an array? Why on earth? Go back to where that got all messed up and fix it there.
-
and the problem IS?
-
Google "Data Normalization". As for your second part, it seems pretty obvious to use the date the post was created. I'm moving this to application design.
- 2 replies
-
- social network
- php
-
(and 2 more)
Tagged with:
-
You should probably fix the sorting issue first. Is the column a varchar instead of an int? You'll probably need to use a subquery for the random part. Or you could select a random number in PHP first, $row = rand(0,9); $sql = "Select * FROM clicks WHERE title!='' ORDER BY clicks DESC LIMIT $row, 1";
-
Add a LIMIT 1 and it should be fine. Did it work?
-
If all you need is the very last post you really should LIMIT it in the query. YUo
-
If all you need is the very last post you really should LIMIT it in the query. YUo
-
If all you need is the very last post you really should LIMIT it in the query. You also should do a COUNT in your other query to just get the number of rows.
-
Now time to read the link in my signature on debugging SQL