Jump to content

Riboflavin1

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Riboflavin1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Would it be something like this then? <?php //connect to database mysql_connect("localhost", "user_twit", "password") or die(mysql_error()); //connect to specific table mysql_select_db("user_twitter") or die(mysql_error()); $result = mysql_query("SELECT * FROM `twitter` WHERE `screen_name`='username' AND `hidden` != 'y' ORDER BY `time` DESC LIMIT 3"); while ($row = mysql_fetch_array($result)) { $text = stripslashes($row['text']); $time = $row['time']; $id = $row['id']; echo "<li><a href=\"http://twitter.com/username/status/".$id."\">".$text."</a></li>\n" ; } ?> Edit: Yup, seems to be working
  2. Its just an example of a twitter post link. Each post can be viewed individually, I want to link to them individually.
  3. Hi all, I have used this script to pull twitter updates to my website and it works great: http://www.inkplant.com/code/pull-twitter-feed-into-your-site.php I was wondering if anyone could help me modify it so that it links to the individual twitter posts such as: http://twitter.com/user/status/4528454817693440 Thanks!
  4. Edit: Wrong section, moving to PHP help, sorry you can delete this
  5. I removed it and it goes back to the original error Fatal error: Call to undefined function dbQuery() I thought maybe including that file might have the function but I guess not. Any Ideas?
  6. Hm, the code I have on the display page now is this: <?php //connect to database mysql_connect("localhost", "user_twit", "password") or die(mysql_error()); //connect to specific table mysql_select_db("user_twitter") or die(mysql_error()); require_once 'db-functions.inc.php' ; //custom database functions $result = dbQuery("SELECT * FROM `twitter` WHERE `screen_name`='name' AND `hidden` != 'y' ORDER BY `time` DESC LIMIT 3"); while ($row = dbGetRow($result)) { $text = stripslashes($row['text']); $time = $row['time']; echo "<li>".date('M j, Y, g:i a',$time)." ยท $text</li>\n" ; } ?> But now it is giving this error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/user/public_html/db-functions.inc.php on line 29 Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/user/public_html/db-functions.inc.php on line 29 Error: Database error! Sorry for being so noob, but mysql errors are pretty foreign to me.
  7. Gah, how did I mess that up. Try this: http://www.inkplant.com/code/pull-twitter-feed-into-your-site.php
  8. Hello all, I have followed the stop on this page to what I thought was a tee: http://www.inkplant.com/code/pull-tw...-your-site.php but I guess I was wrong because I am getting errors. I have setup the database and table properly and created all files, but when I do step 4 and place the code on my site I am getting this error Fatal error: Call to undefined function dbQuery() The api pull went fine and it stored the tweets in the database, but it can't display them. Is there a missing step about connecting to the database somewhere? Thanks for any help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.