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!
TemplatePower & AJAX
Hi all,I'm currently implementing some AJAX features in my PHP-framework (which is based on TemplatePower) and I have encountered a problem:I have a block which holds a message-div. This block is
Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.When I send an email from an email account set up domain (using, for example, xxx@MyDomain.net) and then view the header
NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder 'imagesClients'. The form works as follows: Username: selected from drop down menu.Folder: Slide
Cache PHP Objects/Classes?
Does anyone have ideas about caching PHP objects using something like: http://memcached.org/I have Windows so I cannot use memcached.Is there a PHP extension that caches PHP objects (classes)?
=> and <=
So I was digging through some code when I came across the <= operator. This is the first time I've ever seen it. I felt the same way I did when I first saw a ternary statement. What is
BackButton Behaviour in AJAX
I have an ASPX Page AJAX Enabled!The page has a gridView and a DDL for filtering on it. The Gridview has links on its items. The behaviour I am running into is:If I filter a criteria from DDL and then
how to transport the Query and insfoset
Hi
Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
Pagination won't carry results past page 2.
Hi all,I've worked out my pagination script and its paginating fine until I click next from page 2 at which point it stops displaying results. I know its something really simple, but can't see what
Company Code for Vendors created through Business Partners
Hi, experts!