Hi,
I think I'm trying to learn the DB part of Php.
So far I've made a DBtable with phpMyAdmin
it has three parts...
1- ID#
2- Title
3- Body
My thinking is to retrieve and display the data on a webpage.
I made a config file - looks like this...
Next I'm woking on the grammer and syntax but I'm having a hard time of it.Code:<?php $host = "localhost"; $user = "xxxxxx"; $password = "xxxxxx"; $database = "abcd_soblog"; ?>
I've tried several variationsCode:<?php require ('config.php'); $query = "SELECT * FROM 'ablog' LIMIT 0, 30"; ?>
I've got four books and it seems they jump from a simple echo statement - to complex DB schemas. Even the online tutorials seem to skip the kind of very basic step by step - ( understanding the baby steps ) - kind of tutorial I guess I need.Code:<?php $host = "localhost"; $user = "xxxxxx"; $password = "xxxxxx"; $database = "abcd_soblog"; $result = mysql_query("SELECT abcd _soblog * FROM ablog",$db); printf("title: %s<br>\n", mysql_result($result,0,"first")); printf("body: %s<br>\n", mysql_result($result,0,"last")); ?>
I would like to see a display of...
and then maybe something like showing all four entries n the DBTable.A Big Title
bla bla ipsum epsum bla bla body of text etc...
I'm hoping some kind person can help me get a grip on this, please.
![]()



Reply With Quote

Bookmarks