You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial). Because of this, it is possible that our website may not appear correctly in your browser. We apologise for the inconvenience, and recommend you upgrade your browser to one which is compatible with CSS. For more information, please visit our Browser Upgrade page.

4WebHelp

PHPLIB: Database Abstraction by Peter

Last updated: 02/05/2012
<html>
<head>
<title>Our fruit</title>
</head>
<body>

<p>This is the fruit we have available at the moment:</p>

<p><b>Fruit:</b> Banana;   <b>Price:</b> £0.99/bunch<br>
Funny yellow crescent shaped thing</p>

<p><b>Fruit:</b> Pineapple;   <b>Price:</b> £1.69 ea<br>
Lovely and juicy</p>

<p><b>Fruit:</b> Apples;   <b>Price:</b> £0.69/pound<br>
Many different varieties available. Come and see our range</p>

<p><b>Fruit:</b> Oranges;   <b>Price:</b> £1.42/Kg<br>
Just arrived straight from Israel</p>

</body>
</html>
Comments on this tutorial
Name: kishoreEmail jrkishore4u at gmail dot com
thank u for providing nice tutorial now i get information related to data abstraction  & while($db->next_record())....
Name: MarkEmail none
CREATE TABLE test (
name varchar(150),
description text,
price varchar(50)
);
# Let's insert some data:
INSERT into test (name, description, price) VALUES ('Banana', 'Funny yellow crescent shaped thing', '0.99/bunch');
INSERT into test (name, description, price) VALUES ('Pineapple', 'Lovely and juicy', '1.69 ea');
INSERT into test (name, description, price) VALUES ('Apples', 'Many different varieties available. Come and see our range', '0.69/pound');
INSERT into test (name, description, price) VALUES ('Oranges', 'Just arrived straight from Israel', '1.42/Kg');

Is this using MySql 4 or 5?

Add a new comment

This page is © Copyright 2002-2013, 4WebHelp. It may not be reproduced without 4WebHelp's prior permission.