Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linking SQL database to website and visa versa

  • 24-11-2014 11:22am
    #1
    Registered Users, Registered Users 2 Posts: 2,738 ✭✭✭


    Basically I think my terminology when searching is a bit detailed and not finding what I am looking for online.

    So hopefully someone can help.

    I'm looking to have a form where people can enter their details on a web page and their details are then stored and added to database.

    Also, how do you have a database somewhere, and, when required is accessible through a website? So say for example I've a list of houses for sale and someone could search based on location and price to distinguish from a list of thousands available.

    Any help appreciated.


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Read this section, which uses PHP and MySQL.


  • Registered Users Posts: 87 ✭✭minion35


    This would all depend on the following:

    *Programming language that you are using for backend development.
    *Size of the database and the amount of fields you think you'll need.
    *Are you using a form of content management system?


  • Registered Users, Registered Users 2 Posts: 2,738 ✭✭✭Jay D


    Read this section, which uses PHP and MySQL.

    Thanks. I am familiar enough with the two of them, it's just linking I have been having difficulty with and I am not in a situation to test code because of the devise I am using just isn't compatible. However I'm hoping this might be a good example:
    <html>
    	<head>
    	<title>Retrieve data from database </title>
    	</head>
    	<body>
    
    	<?php
    	// Connect to database server
    	mysql_connect("mysql.myhost.com", "user", "sesame") or die (mysql_error ());
    
    	// Select database
    	mysql_select_db("mydatabase") or die(mysql_error());
    
    	// SQL query
    	$strSQL = "SELECT * FROM people";
    
    	// Execute the query (the recordset $rs contains the result)
    	$rs = mysql_query($strSQL);
    	
    	// Loop the recordset $rs
    	// Each row will be made into an array ($row) using mysql_fetch_array
    	while($row = mysql_fetch_array($rs)) {
    
    	   // Write the value of the column FirstName (which is now in the array $row)
    	  echo $row['FirstName'] . "<br />";
    
    	  }
    
    	// Close the database connection
    	mysql_close();
    	?>
    	</body>
    	</html>
    
    minion35 wrote: »
    This would all depend on the following:

    *Programming language that you are using for backend development.
    *Size of the database and the amount of fields you think you'll need.
    *Are you using a form of content management system?

    I will be using html.
    5 columns x 500 rows
    There will be a CMS alright, Terminal 4 but as yet I have to produce raw html version as a demonstration. Do you have any info as to how it might work with Terminal 4? (Although even these questions have triggered thoughts for me, thanks!)


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Jay D wrote: »
    I will be using html.
    5 columns x 500 rows
    There will be a CMS alright, Terminal 4 but as yet I have to produce raw html version as a demonstration. Do you have any info as to how it might work with Terminal 4? (Although even these questions have triggered thoughts for me, thanks!)
    You won't be programming anything with html, just re-skinning the CMS output; in reality the CMS will be handling all the DB transactions. I suggest your read the Terminal 4 documentation on the subject.


  • Registered Users, Registered Users 2 Posts: 2,738 ✭✭✭Jay D


    You won't be programming anything with html, just re-skinning the CMS output; in reality the CMS will be handling all the DB transactions. I suggest your read the Terminal 4 documentation on the subject.

    Sorry I thought web development on this section catered for html and not solely programming elements. As yet I will not have access to T4 but suppose a spiel on it could be useful, thanks.


  • Advertisement
  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Jay D wrote: »
    Sorry I thought web development on this section catered for html and not solely programming elements. As yet I will not have access to T4 but suppose a spiel on it could be useful, thanks.
    It does, but that does not change the fact that you're using a CMS and it will be this and not anything you code yourself that will be accessing the database - after all, the database, being on the server, needs to be accessed on the server, which is a bit difficult to do with html which executes in the client.

    And so as you're using a third party CMS to do this, then you ultimately have to read the manual on how it needs to be configured to do so.


  • Registered Users, Registered Users 2 Posts: 2,738 ✭✭✭Jay D


    Had completely forgotten about this which I used before, should someone stumble upon this thread looking for something similar.


Advertisement