answersLogoWhite

0

MySQL

MySQL is a Relational Database Management System. It was first released in 1995 and is most commonly used with the PHP programming language. MySQL is open source and 100% free to use.

526 Questions

What services does MYSQL Web Hosting provide?

I found this website that provided me the best services for hosting websites and blogs online in 2021, you can purchase domain names through this website as well and easy to navigate highly www. tiny. cc/Besthosting , when using the link just remove the space between the stop and tiny.... hope I answered your question,

www. tiny.cc/Besthosting

Who makes management software for a database?

The most popular open-source database that is currently available is mySql, made by the company of the same name. It is free to download so the therer is not cost involved and is used across the globe by numerous commercial companies.

What is a char?

A char is a time, a turn or an occasion, an odd job, or a woman employed to do housework.

How do you copy a database of mysql in wamp server from one computer to another?

You have several options:

* copy the database files from mysql/data/<database_name> to a new mysql Installation

* use mysqldump utility to export the data from your database and load it into the new mysql installation

* setup replication

How can you populate a Dropdown with an Array from a Database using PHP?

This can be done with any Database system as the clever part is within the PHP.

There are two ways of doing this. The first method is having each record as a new selection. The second is having one field of the selection.

I'm going to use 'DATABASE {' and '} DATABASE' in order to show you where to put your 'Database {' and your closing '}' for the query.

Each Record

Assuming that you have at least two fields. One called value one called text then the following would work. (If your value is always the same as the Text shown to the user then you can change the set of text to value)

Echo '<select name="myselect">';

#DATABASE {

$current_value = $DATABASE['value'];

$current_text = $DATABASE['text'];

$myarray[] = '<option value="' . $current_value . '">' . $current_text . '</option>'; #A*

} DATABASE

Foreach($myarray as $key => $value){

Echo $value;

}

Echo '</select>';

Of course in this method you do not require an array as such. Due to the fact that on line A* could echo the value there and then.

One Field

This would be used more in the cases in which the table is built for forms and works like a Content Management System (CMS).

Firstly set out your record contents as: (I'm assuming here that the field is called dropdown)

I am a value[nowtext]I am some text[nextopt]I am a second Value[nowtext]I am some more text

Now let me explain. If you split this up in to [nextopt] there are two options. If you then split each again by [nowtext] you'll find 2 in between the [nextopt].

In this case, the first item set is the value of the Dropdown. The second is then the text and is split using [nowtext].

There are two functions in PHP which will help us. The first is called explode(); and this works like myfeild.split(); in Javascript. The second is implode();. Explode() is making an array. Think of it as, Explode the information into smaller chunks. Implode is the opposite, this takes an Array and turns it in to a String. (I've added two links to W3schools for reference on these tags)

Fairly simple when you understand how they work. Here's an example:

Echo '<select name="myselect">';

#Database {

$current_dropdown = $DATABASE['dropdown'];

$dropdown_array_a = explode('[nextopt]',$current_dropdown); #Makes an array

Foreach($dropdown_array_a as $key => $value){ #Runs for each item in array and loads in the key and the value of the array.

$dropdown_array_b = explode('[nowtext]',$value

Echo '<option value="' . $dropdown_array_b[0] . '">' . $dropdown_array_b[1] . '</option>';

}

# } DATABASE

Echo '</select>';

That was two of the many ways to perform this task. A link to the reference of Explode, Implode, Arrays and Foreach has been added to the Question.

How do you run a MySQL query from PHP file?

Here is a simple script that you can do to run a MySQL query after you have set a database up.

<?php

// Database Settings

$db['hostname'] = "localhost";

$db['username'] = "<db username>";

$db['password'] = "<db password>";

$db['database'] = "<db name>";

// Connect to MySQL

$connect = mysql_connect($db['hostname'], $db['username'], $db['password']);

// Select Database

mysql_select_db($db['database'], $connect);

// Do MySQL Query

mysql_query("INSERT INTO table_name SET field_name = '1234567890'");

// Close MySQL

mysql_close($connect);

?>

Obviously you will need to use your own MySQL settings and database details, but this gives you a general overview of how you can do it.

What is unsigned in mysql?

In MySQL, "unsigned" is a data type. When we put an unsigned in a column, it says you can't put negative integers in there. With unsigned int, the maximum range is 4294967295. Note: Inserting a negative value will result in a MySQL error.

To learn more about data science please visit- Learnbay.co

How do you delete all table in a database?

Unless you want to drop (delete) the entire database, you will must delete tables individually.

To delete tables individually, execute the query "SHOW TABLES" in your database which will return a list of all table names. Iterate through that resultset and execute "DROP TABLE {$table_name}"

What are the types of end users?

There are two types of End user
1.Native User
2.Sophisticated User (Technical User)

Explain normal forms with simple example?

Normal Forms

First Normal Form: Every field of the table must be atomic(indivisible)i.e there must be no composite or multivalued fields.Eg.Consider a table Employee such that it has 5 fields Name,Age,Sex,TelephoneNo,we represent it as

Employee(EmpNo,Name,Age,Sex,Tno).

Empno Name Age Sex Tno

1001 A 24 M 234567,678901

1002 B 25 F 123456

Clearly, the above table is not in 1NF as the field Tno may contain more than one values because each employee may have more than one Telephones.

To make it in 1NF,however, we can do some improvisations,

First Improvisation

Add an extra field "Tno2", our table Employee now looks like Employee(EmpNo,Name,Age,Sex,Tno1,Tno2)

Second Improvisation

Repeate the remaining field values for each Telephone value

Empno Name Age Sex Tno

1001 A 24 M 234567

1001 A 24 M 678901

1002 B 25 F 123456

As you can see both these improvisations have added extra information storage overhead with them. So the most recommended one is the DECOMPOSITION.

Here we will Decompose our erroneous table into more tables.

Employee1(EmpNo,Name,Age,Sex)

Employee2(EmpNo,Tno1,Tno2)

Now our tables will look like this

Employee1

Empno Name Age Sex

1001 A 24 M

1002 B 25 F

Employee2

Empno Tno1 Tno2

1001

What is the latest version of MySQL?

The latest versions of MySQL are:

Stable:

MySQL 5: version 5.1.48 (2 June 2010)

Preview Release:

MySQL 5: version 5.5.4 (9 April 2010)

Does comcast ISP provide web hosting with its basic service?

Yes

You would need to go to their website intro page for more information.

My ISP is comcast so I don't know if you get a different page if you're not (i.e. the page I see has a 'start now' button).

If not, try searching for "comcast personal web host" and you will get the link I used before being redirected to the above page.

How retrieve xml data using php?

Ypu can use file handling function to read XML

file_get_contents()

file()

fopen()

Use SimpleXML Library

simplexml_load_string - Interprets a string of XML into an object

simplexml_load_file - Interprets an XML file into an object

How do you make a loop radio buttons that saves to database?

Radio Buttons allow only one value between them. For eg. Male or Female. So there is no point in declaring a loop for it. You could store the value like any other form elements. If you declare different names for radio buttons then & then only use this:

Orange

Apple

Grapes


File: action.php

if(isset($_POST['submit']))

{

if(isset($_POST['radio1']))

{

$value1 = $_POST['radio1'];

}

else

{

$value1 = "";

}

if(isset($_POST['radio2']))

{

$value2 = $_POST['radio2'];

}

else

{

$value2 = "";

}

if(isset($_POST['radio3']))

{

$value3 = $_POST['radio3'];

}

else

{

$value3 = "";

}

$value = $value1." ".$value2." ".$value3;

// Store the $value in database

}

?>

Ideally a checkbox is better suited to have multiple values

Explain the difference between a weak and a strong entity set?

An entity set that does not possess sufficient attributes to form a primary key is called a weak entity set. One that does have a primary key is called a strong entity set.

The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set

The existence of a weak entity set depends on the existence of a identifying entity set. It must relate to the identifying entity set via a total, one-to-many relationship set from the identifying to the weak entity set

We depict a weak entity set by double rectangles in E-R diagram. We underline the discriminator of a weak entity set with a dashed line in E-R diagram.

How do you validate and retrieve data from database?

How do you validate and retrieve data from database?" How do you validate and retrieve data from database?"