Jump to content


Photo

Newbe Question - How to Access MySQL Database


  • Please log in to reply
2 replies to this topic

#1 Napper

Napper
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationEurope

Posted 12 June 2003 - 08:23 PM

Hi everybody!

I am sorry to ask this kind of question, it seems to be so obvious that no tutorial really ever bothers to mention it. Here is my situation: I am working on a website, have good knowledge of HTML and reasonable knowledge of both JS and PHP, so the next stop obviously would be to implement some form of MySQL Database, especially since my customer is planning to build a little online product exhibition. My website providor has set up a MySQL Database on our server and I have username and password handy. Most of my knowledge I have from tutorials but so far I have not been able to grasp one all deciding concept of MySQL:

Where do ya enter them code?

Every tutorial I have encountered so far just starts with this happy-world \"now let\'s connect to the database. Type in...\" without giving me the faintest hint of where to type it in. I understand that the later query commands will be integrated into a PHP site but what about them data-base building, data-entering kind of things? Where do I punch in:

mysql_query(\"CREATE TABLE users (
firstname VARCHAR(20),
surname VARCHAR(20),
location VARCHAR(20))\");

and similar? I hope somebody can give me a hint here. It just CAN\'T be the DOS promt! It CAN\'T be...

Reg.

Napper
<?php 
if ($time_spend_on_pc >= 14) {$brain = 'fried'};
?>

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 12 June 2003 - 08:36 PM

Try this

http://www.freewebma...ials/phpmysql/1
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 Napper

Napper
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationEurope

Posted 12 June 2003 - 10:21 PM

Thank you very much for your help. I finally managed to install phpMySQL and am adding my tables and entries now. Since I had most of this already prepared on paper this is one heluva breakthrough! Thanks again!

Napper
<?php 
if ($time_spend_on_pc >= 14) {$brain = 'fried'};
?>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users