Hi, I am currently trying to make a part for my user driven website where one user can subscribe to another and whoever they have subscribed to is echoed back on there profile page.
my users table structure is: id username password and my subscription table is: id user_id follow_id
i am currently trying to query the logged in users subscriptions with this sql_query
$subsQuery = mysql_query("SELECT U.username FROM users AS U INNER JOIN subscription AS Sub.follow_id=U.id WHERE Sub.user_id=".$ID); $ID being the logged in users id.
However when trying to echo this on the page using this bit of php:
<? while ($subs = mysql_fetch_assoc($subsQuery)) { ?><br /><br />
<? echo $subs['username'] ?>
<? } ?>
it throws back this error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/avince/public_html/users/user.php on line 53
Any help would be much appreciated!
Search function
I am looking for some guidance from the experts.I am trying to create a search function. It will only be searching one table. The search criteria consists of two drop down menus. Each menu lists
Paypal
Hi all,I have an advanced basic knowledge of php I want to try something new for a site I am working on, its a members site with a monthly fee for being a member of the site. Basically what I want to
LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...$result = mysql_query("SELECT * FROM messages ORDER BY timemsg DESC LIMIT 10");In a perfect world all the rows ID's would
upload form file types....
Hey all, I am learning PHP and I am writing a script from the W3C Schools tutorials for uploading files to my server. I want to be able to use it for a friend to upload files to my server (I know to
IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST method?please help
PHP error (line 38) my website
Hello everyone, I'm new on thisand I got a web site thats got a error not showing the photos onthe page http://www.tozecerdeira.comxa.com/produtos_guitarras.phpcan someone be kind to see wath is
Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to the user. Everything works fine, except I am running into difficulties with dynamic links.The code
dropdown menu
Hello everbody, I am php newbie. I need to develop a program that once click the drop down menu, the textarea will change the value base on the dropdown menu. I have problem changing the value of
reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos selected from the most recently submitted ones, and displayed at the top of the page. I figured
Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that query, so I'm using the following to do this: