Jump to content

Fabbuccino

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Fabbuccino's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have two tables, both having one common field, along with other uncommon fields, of course. the tables look similar to members ======================= id | username | password, etc ======================= comments ======================= id | comment | memberid, etc ======================= what my issue is that when I perform my query and join both tables making memberid = members.id, if i want to print/echo out the comments id i can't. I tried using a fetch array and performing a $row['id'] ..it gives out the id from the members page. i tried $row['comments.id'] and it didn't print anything. how can i specify that I want the id from the comments page? EDIT: nevermind. I got it. I just switched the tables around in the query putting my comments table second $sql = "SELECT * FROM members, comments WHERE members.id=comments.memberid";
  2. dw. i got it. lol. my bad thanks for your time btw
  3. This is my code $teid = $_GET['catid']; // list all articles found $result = @mysql_query("SELECT authorid, article, articletitle, dateadded, authorid FROM articles, authors WHERE articles.id=" . $teid . " AND authorid=authors.id"); I tried many things and it keeps giving me this error Error performing query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND authorid=authors.id' at line 1 now just to give you a background on what's happening i have two tables...as u can see. articles and authors the tables look similar to this articles ====== id | article | authorid ====== authors ====== id | name | email basically..i want the query to grab the article id from the previous page [saved in the url], and then get the authorid in the same entry, and use the to set the authors id. if i ONLY put authorid=authors.id, it works, but then it just lists every article...yes it does it in order of authors, which is fine, but i only want the article of the id given..how do i do that?
  4. ok thanks. the new lines worked. now i think what my main issue is the fact that i inserted the piece of text in the mySQL database manually and so when trying to convert it back when echoing, it ain't doing that. now, i was able to fix the single quotes through a program i made with visual basic, lol, but i still have an issue with the three dots like this "..." it doesn't accept that..how come?
  5. Hey Kinda new to mySQL. I have, in a table, a long piece of text with quotation marks, apostrophes, and new lines. When I echo that piece of text into a php page, the new lines are ignored and the text is just one big block of text and the apostrophes are ignored. Why so? I've tried using "htmlspecialchar" when echoing..no luck. any clue as to why this is happening?
  6. What is the limit of the values in a cell in table in mysql? I am making a website that will need to store text as much as 2-3 A4 pages on average. Will mySQL allow that in one table cell?
×
×
  • 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.