@jasen
To get a column with duplicate records using PHP and MySQL, you can use the following steps:
- Connect to the MySQL database:
$conn = mysqli_connect("localhost", "username", "password", "database");
- Execute a MySQL query to select the column with duplicate records. In this example, we assume the table name is "your_table" and the column name is "your_column":
$sql = "SELECT your_column FROM your_table GROUP BY your_column HAVING COUNT(*) > 1";
$result = mysqli_query($conn, $sql);
- Iterate through the result set and print the duplicate column values:
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
echo $row['your_column'] . "";
}
} else {
echo "No duplicate records found.";
}
- Close the database connection:
mysqli_close($conn);
Make sure to replace "localhost", "username", "password", "database", "your_table", and "your_column" with the appropriate values for your database setup.