Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EXTREMELY basic SQL question

Featured Replies

Good morning, I am new to this forum and hope you. Can help me solve an issue I have.

 

I am a graphic designer who has taken an interest in web design as a hobby and have become adequate in using html/CSS.

 

I really struggle with the server side coding etc and have the following question regarding access to an SQL database.

 

If I have the following SQL database/table set up on my server:

 

Server: 000.000.000.000

Database: dw132_db

User: dw132

Password: password

Table: testable

 

 

What EXACT code would I have to add to my html page to publish data from the table on my web page?

 

I don't seem to be able to find this basic information anywhere? Or am I asking the wrong question?

 

Thank you in advance

You would need to break it down into a few areas. First you would login to the database then insert data into the relevant tables.

 

The syntax is different between MySQL and MSSQL so that is quite important.

 

There are articles out there to explain how to do this. Here's one that shows you how to do this https://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059

What server-side language are you using? You'll need to set up a connection to your database first, then use a query to select and return information from the database to your script.

For example, a VERY simple PHP application could be

<?php 
// Connect to the database
$link = mysqli_connect("000.000.000.000","dw132","mypassw","dw132_db"); 

// Create a query
$query = "SELECT * FROM testable"; 

// Execute the query
$result = $link->query($query); 

// Present the results
while($row = mysqli_fetch_array($result)) { 
  echo $row["id"] . "<br>"; 
} 
?> 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.