Is fetchall related to php?

|
Khushi Hura 2021-12-30 18:04:28
Then from that follow the procedures as it asks
Poonam Nigam 2021-12-30 18:04:34
Khushi Hura 2021-12-30 18:04:02
Just install mysql installer from Google

can you provide me a link for it?

Khushi Hura 2021-12-30 18:04:41
Ya sure
Khushi Hura 2021-12-30 18:04:44
Just a min
Khushi Hura 2021-12-30 18:05:59
https://youtu.be/-cHS4HoEFV8

How to install MySQL on Windows 7YouTube
Beginner oriented instructions to installing MySQL on Windows 7. Included is a walk-through of adding the mysql command-line tools to your path.

Update April 19, 2019: Check out my updated video: https://youtu.be/w5TsNZRWBNE

Khushi Hura 2021-12-30 18:06:07
U can go through this
Poonam Nigam 2021-12-30 18:07:34
Okaayy thanks
Poonam Nigam 2021-12-30 18:40:14
Khushi Hura 2021-12-30 18:06:07
U can go through this

Hey..its showing some error on installation saying .net framework not installed..and while installing it..giving error

MasterZiv 2021-12-30 22:44:24
Poonam Nigam 2021-12-30 18:40:14
Hey..its showing some error on installation saying .net framework not installed..and while installing it..giving error

.Net is not necessarily needed, maybe only for some extra components

Khushi Hura 2021-12-31 06:43:09
Poonam Nigam 2021-12-30 18:40:14
Hey..its showing some error on installation saying .net framework not installed..and while installing it..giving error

Oh.

Khushi Hura 2021-12-31 06:43:17
U can check that online
Khushi Hura 2021-12-31 06:43:35
U can type this error on google then u will get the solution for the problem
piterden 2021-12-31 22:58:13
Here is another one https://dbfiddle.uk/

dbfiddledbfiddle.uk
Free online SQL environment for experimenting and sharing.
dev 2022-01-01 00:13:13
Hello everyone,
I am building a simple website to practice php and MySQL.
I have a table in my database with the name workshop, and it has different column like id, name and description.
I saw a tutorial on how to retrieve the data :
<?php
// Get the 4 most recently added products
$stmt = $pdo->prepare(‘SELECT * FROM products ORDER BY date_added DESC LIMIT 4’);
$stmt->execute();
$recently_added_products = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
with its id and I want to retrieve it the same way to go further and add the chosen workshop to the cart but when I try the same tutorial, I have the following error but first this is how I connect to the database:
<?php
$mysql_hostname = “localhost”;
$mysql_user = “root”;
$mysql_password = “”;
$mysql_DB = “system”;
$db = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password, $mysql_DB);
?>

And I tried this on the page that I want to import the data in it

$statment = $db->prepare(‘SELECT * FROM workshop’);
$statment->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);

But this error on the browser:
Uncaught Error: Call to a member function fetchAll() on null.

I really don’t know where is the exact issue here?

piterden 2022-01-01 00:15:16
dev 2022-01-01 00:13:13
Hello everyone,
I am building a simple website to practice php and MySQL.
I have a table in my database with the name workshop, and it has different column like id, name and description.
I saw a tutorial on how to retrieve the data :
<?php
// Get the 4 most recently added products
$stmt = $pdo->prepare(‘SELECT * FROM products ORDER BY date_added DESC LIMIT 4’);
$stmt->execute();
$recently_added_products = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
with its id and I want to retrieve it the same way to go further and add the chosen workshop to the cart but when I try the same tutorial, I have the following error but first this is how I connect to the database:
<?php
$mysql_hostname = “localhost”;
$mysql_user = “root”;
$mysql_password = “”;
$mysql_DB = “system”;
$db = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password, $mysql_DB);
?>

And I tried this on the page that I want to import the data in it

$statment = $db->prepare(‘SELECT * FROM workshop’);
$statment->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);

But this error on the browser:
Uncaught Error: Call to a member function fetchAll() on null.

I really don’t know where is the exact issue here?

Why $stmt? You have the statement in another variable

dev 2022-01-01 00:15:39
Yeah my bad
piterden 2022-01-01 00:15:43
dev 2022-01-01 00:13:13
Hello everyone,
I am building a simple website to practice php and MySQL.
I have a table in my database with the name workshop, and it has different column like id, name and description.
I saw a tutorial on how to retrieve the data :
<?php
// Get the 4 most recently added products
$stmt = $pdo->prepare(‘SELECT * FROM products ORDER BY date_added DESC LIMIT 4’);
$stmt->execute();
$recently_added_products = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
with its id and I want to retrieve it the same way to go further and add the chosen workshop to the cart but when I try the same tutorial, I have the following error but first this is how I connect to the database:
<?php
$mysql_hostname = “localhost”;
$mysql_user = “root”;
$mysql_password = “”;
$mysql_DB = “system”;
$db = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password, $mysql_DB);
?>

And I tried this on the page that I want to import the data in it

$statment = $db->prepare(‘SELECT * FROM workshop’);
$statment->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);

But this error on the browser:
Uncaught Error: Call to a member function fetchAll() on null.

I really don’t know where is the exact issue here?

Also, in is the question related to PHP

dev 2022-01-01 00:15:44
I was writing the question
piterden 2022-01-01 00:16:00
Not to MySQL
dev 2022-01-01 00:16:01
It is statmenet but i was writing fast
dev 2022-01-01 00:16:18
Is fetchall related to php?
piterden 2022-01-01 00:16:26
dev 2022-01-01 00:16:18
Is fetchall related to php?

Exactly

dev 2022-01-01 00:16:58
I thought it is from mysql because when I search I found it in the mysql site thank you Denis
piterden 2022-01-01 00:18:36
dev 2022-01-01 00:16:58
I thought it is from mysql because when I search I found it in the mysql site thank you Denis

No, inside your question only SELECT * FROM workshop related to mysql. Everything else including the connection is absolutely PHP code

dev 2022-01-01 00:19:26
Okay thank you very much because I was very confused.
piterden 2022-01-01 00:25:16
Thanx. There is aslo https://dbfiddle.uk/ and https://www.db-fiddle.com/

dbfiddledbfiddle.uk
Free online SQL environment for experimenting and sharing.
piterden 2022-01-01 00:26:10
And for php I use repl.it
piterden 2022-01-01 00:28:24
I see, and I didn’t say it is bad one. Thank you for sharing it. It’s new for me
piterden 2022-01-01 00:29:34
Could you show an example case of using both together?
piterden 2022-01-01 00:33:02
What is the reason you can’t execute your DDL inside PHP code?
piterden 2022-01-01 00:37:51
I have already asked one. You may answer it at any time when it will be comfortable for you.
Saikumar K 2022-01-01 11:16:43
Can anyone suggest Best monitoring tool for MySQL for queries which are taking long time
MasterZiv 2022-01-01 12:22:21
Saikumar K 2022-01-01 11:16:43
Can anyone suggest Best monitoring tool for MySQL for queries which are taking long time

Show query log

Saikumar K 2022-01-01 12:23:10
MasterZiv 2022-01-01 12:22:21
Show query log

I need tool

MasterZiv 2022-01-01 12:24:25
Saikumar K 2022-01-01 12:23:10
I need tool

It is a tool

|