Forum Moderators: coopster

Message Too Old, No Replies

Displaying a MySql table in a HTML page

How to display a MySql table in a HTML page

         

SokrMan

5:01 pm on Aug 25, 2010 (gmt 0)

10+ Year Member



So I have a jobs database with the following columns: id, jobtext, jobdate, and id. This is how it looks right now: [prahan.com...]

I have another table called author. In the authorid column in need the results of this query, SELECT name FROM author WHERE id = (SELECT authorid FROM job) , to be displayed for each row.

I also want to be able to customize the header title for each column.

Thanks in advance!

rocknbil

4:35 am on Aug 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard sokrman,

$query = "select author.name,job.jobid from author,job where author.authorid=job.authorid and author.id = $author_id order by job.jobid asc";

Should do it to select by author, change it to job.id=$job_id to select by job. Change the field names accordingly.