/    Sign up×
Community /Pin to ProfileBookmark

Question on: mysqli_stmt_store_result()

Hi,

I am getting confused about this mysqli_stmt_store_result().
If you use mysqli_stmt_bind_result() then why the need to sue the mysqli_stmt_store_result() ?
I have seen the mysqli_stmt_bind_result() working without the mysqli_stmt_store_result() so why use the latter atall ?
Look here, they used both:
https://hotexamples.com/examples/-/-/mysqli_stmt_store_result/php-mysqli_stmt_store_result-function-examples.html

Look here, they only used the mysqli_stmt_store_result():
https://www.tutorialspoint.com/php/php_function_mysqli_stmt_num_rows.htm

Look here, I only used the mysqli_stmt_bind_result() and it works:
https://forum.webdeveloper.com/d/400329-is-my-http-build-query-useage-fine-or-not

And so, I do not see what use the mysqli_stmt_store_result() is used for or what benefit it gives.

to post a comment
PHP

21 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmAug 03.2022 — That's why most of us use pdo. It's easier.
Copy linkTweet thisAlerts:
@novice2022authorAug 03.2022 — @ginerjm#1645616

Php has drained me. Not getting into further php with pfo. After finishing prepared statements, migrating to Python programming, which is less complicated.
Copy linkTweet thisAlerts:
@ginerjmAug 03.2022 — From all of your repeatedly inane questions while trying to use/learn PHP, I fear the same amount of similar needless queries for the readers of the Python forums......

Have fun.
Copy linkTweet thisAlerts:
@novice2022authorAug 03.2022 — @ginerjm#1645619

I will get them a COBRA (you to deal with) and so once they see the fangs of the COBRA, they better answer all my questions. And, FAST!

Lol!
Copy linkTweet thisAlerts:
@novice2022authorAug 03.2022 — @sempervivum

Do you know the answer to my op ?

Thanks.
Copy linkTweet thisAlerts:
@SempervivumAug 04.2022 — @novice2022#1645625
>Do you know the answer to my op ?

Unfortunately I do not and I won't do any research on that.

I agree with @ginerjm
>That's why most of us use pdo. It's easier.

From the early years of my career I remember a short story a tutor told his audience:
>A warehouse worker is hauling a heavy sack on his shoulders through the warehouse. A workmate says: "Why don't you use a wheel barrow?" The worker replies: "Are you crazy? You want me to carry a wheel barrow around on top of the heavy sack?"

Please don't take newer or modern techniques as a burden but as an easement instead.

Additionally using PDO and prepared statements is half the battle when dealing with security issues.

The same applies to old school table or float layout vs. grid and flex: When being used properly the modern techniques make layouting much easier, particularly when you are dealing with responsive layouts.
Copy linkTweet thisAlerts:
@paanjii2Aug 04.2022 — The mysqli_stmt_store_result() function accepts a statement object as a parameter and stores the resultset of the given statement locally, if it executes a SELECT, SHOW or, DESCRIBE statement.
Copy linkTweet thisAlerts:
@novice2022authorAug 09.2022 — @Sempervivum#1645631

You have a good memory and remember me the person who was unwilling to learn css.

You see, I tried many times to learn pdo but the syntax seems very messy and I got used to the mysqli_ syntax and that's why I stick to it's functions. All these OOP confuses me. I do not understand objects. Atall. Hence, stick to precedural style in php.
Copy linkTweet thisAlerts:
@novice2022authorAug 09.2022 — @ginerjm#1645619

Amigo,

Nah!

With php, they did not plan the programming language (syntax, etc) properly.

Then they copied things from C etc as they went along building different versions. Originally, they only gave thought to procedural style then started changing things, like syntax, way too much when adding OOP and php seemed like another language. Made a right mess of things. Adding spaghetti with noodles. That's why it's confusing to learn one part of php from another. B'cos it seems like a different language now from the syntax it had originally. So, it's like learning more than one language. Hence, the struggle to learn it.

As for Python, they planned things right from the beginning and syntax is not messy and does not change here and there with version updates. And so, I should not have that much trouble learning it.

You get me, dude ?

You know Python ? Which one you like better, Python or Php ?
Copy linkTweet thisAlerts:
@ginerjmAug 09.2022 — What I like is when you stated you were giving up on PHP and moving to the Python forums.
Copy linkTweet thisAlerts:
@novice2022authorAug 09.2022 — @ginerjm#1645725

Why you like that ? Cos you no hang around in python forum, cos you not know python ?

Can I see your social network profile ? Want to see what you look like.

Here, rather waste yourself on below link, than waste yourself chit chatting here:

https://forum.webdeveloper.com/d/400361-why-array-leaks-memory-on-every-page-reload

Ok ?
Copy linkTweet thisAlerts:
@SempervivumAug 11.2022 — @novice2022#1645718

Although two days have passed already I'd like to add some remarks to your criticism on PHP.

Take a look at other languages, the situation is pretty much the same:

Regarding javascript: Years ago it was a pain, every browser had it's own "standard" and coders had to take into account all of these. jQuery was developed as a workaround in order to unify things. Now the situation is different, JS is unique among browsers and there is no need to stick to the past and use jQuery.

Regarding HTML and CSS: Years ago there were only tables and float layout. It was a pain to develop responsive layouts. Now flex and grid are available and the latter is a pleasure and easy. The usage of tables and float is limited to special situations.

One more example from python: Recently I tried to make myself familiar with asynchronous HTTP requests in python. I dived into a labyrinth of different approaches and libraries where it's difficult to find the latest and modern ones. Try it yourself and have fun.

Summary (maybe I'm repeating myself): Don't stick to the past, use recent techniques and you'll be happy.
Copy linkTweet thisAlerts:
@NogDogAug 11.2022 — @Sempervivum#1645859

Not saying this is by any means the final word on PHP in 2022, but it's worth listening to. Of course, a lot of it includes using Laravel and talks about Object-Oriented PHP -- which the OP refuses to learn. ;)

https://youtu.be/X5lxnlcjrWM
Copy linkTweet thisAlerts:
@novice2022authorAug 12.2022 — @Sempervivum#1645859

Thanks for the advice. Atleast you are never rude.

Why I was biased towards html over CSS ? Cos I got a good idea of a viral social network and I want o build it with 90's technology and show the modern technologied SNs that I defeated them with a crappy looking site. It's not the design that really counts but the features. That is the point I wanna get through to these people.

So on this project. Sticking to just html.

Next project which I start with Python (the modernest lang), I can build modern website with modern design (css).

Everything modern on that.

Have you watched the 70's series "Columbo" ? Do you ever wonder why he does not change his 50's car ?

Well, I am building a car (website) like that. Old dated. WHich will put the SNs to shame. My secret weapon is that, I will give features for users like you to earn money. That way, you ditch the others, like the selfish facebook, who only profit from you but do not help you for free to make profits unless you pay them an arm & a leg. Even selling your personal details out, they now profit from you like this.

Good thing I never bothered learning client side programming no matter how much the world was advertising fore me to learn javascript. I hated it and ignored it for nearly 2 decades. And those who learnt it. Now look at them, they are crying they wasted brain cells learning something that got outdated and they can't make use of the outdated functions anymore.
Copy linkTweet thisAlerts:
@novice2022authorAug 12.2022 — @NogDog#1645860

I chose php over Pythin back in 2015. Was biased towards php and crazy for it. But after going round and round in circles where they keep updating and outdating things, I got fedup.

To filter, first they invented mysqli_escaped some function. Forgotten the name now.

Then they invented some other function.

Then prepared statements (mysqli).

Then pdo.

All do the same thing but they kept changing things and each time the update had dofferent looking syntax and so each one seemed like a lang on it's own.

Had I known back then pdo is modern then I would have started on that, ditching the rest.

And so, I started from bottom. Halfway learning it, at forums others suggested another feature, claiming I learning outdated stuffs.

Then while half learning that suggested one, others came and suggested another, saying I learning old stuff. And so, This put me off from php.

And I am still putoff.

However, since I been taken for a ride by old php stuff for few yrs now. I wish to complete my half completed projects and earn some before diving into python and quitting php.

Yes, a lot of regret I got about php, like the javascript guys. That I learnt old php stuffs, wasting my brain cells & time and at the end have to ditch what I Iearnt and what experiences I gained (after so many sleepless nights of experimentations ruining my health at this middle age).
Copy linkTweet thisAlerts:
@ginerjmAug 12.2022 — I feel so sad for you......
Copy linkTweet thisAlerts:
@novice2022authorAug 14.2022 — @ginerjm#1645891

I will also feel sorry for you when World War 3 starts in 2025 after Donald Trump gets re-elected and the Western Civilsation is no more due to each nuking each other.

If you in USA, then I feel sorry for you as you will not live beyond 2028 as a meteorite will hit America and destroy it (based on many Religions Prophecies).

I will feel sorry for you if you do not survive the upcoming global famine where food will be short for 12 months after all the crops globally get burnt after the World Temperature rises to double this or next yr to what it usually is. Temperature double due to the result of explosion the two stars make after colliding with each other. 1/3 of humanity will be dead due to famine. 1/3 will be dead due to plague and WW3.

Only 1/3 will remain by 2028.

However, I will be happy for you if you survive all this.

As for what I am claiming, if I get the time, we will chat about this in an appropriate forum category here some other day. Not tonight.

And do not reply back that, you ain't interested cos you will be once I am finished lecturing you about your future plans which I will dictate.

If you in USA/Canada/Europe, then go and apply for some Asian or African citizenship, if you want to live beyond 2028. But avoid the Europe and these Asian parts (Middle East, China, Indian Subcontinent) as you are seeing their last days.

Better try Central-Africa. And avoid the cities.

Yes, I keep tabs on Jewish, Christian, Islamic, Hindu, Native American, etc. Eschatology (End Time Prophecies) along with Science.

And do not reply back I am crazy. You will regret it latter.

Nasa is currently watching the meteor. And the two stars. Youtube for them.

Do not bother replying. Just do your own research on what I said.
Copy linkTweet thisAlerts:
@ginerjmAug 14.2022 — blah, blah, blah. I can't believe you do any better with all that you just wrote about than you do with your attempts at programming.
Copy linkTweet thisAlerts:
@novice2022authorAug 14.2022 — @ginerjm#1645942

Nasa is currently watching the meteor (that will hit the Americas and extinct USA etc.). And the two stars (that will bring global famine for 12 months and heat-up the earth double). Youtube for them and learn what Nasa says and what religions Prophecy about (Usa, UK, Europe, Russia, Egypt, Turkey, Syria, Palestine, Israel, Iraq, Iran, Afghanistan, China). Avoid these countries from 2025-2028 (World War 3 period).

Which country you live in ? I ditched Europe to avoid WW3. Will visit the Americas for first time before WW3 starts and Americas go extinct. Prophecies say Ww3 will start in 2025. So I might aswell visit you in USA in 2024 and try to put some sense into you to apply for any central African citizenship. Unless ofcourse, you are in UK. Then, I might visit you this Christmas. ;)
Copy linkTweet thisAlerts:
@ginerjmAug 14.2022 — I am surprised that a moderator hasn't marked you for extinction considering the nonsense you continue to post that IMHO nobody wants to read.
Copy linkTweet thisAlerts:
@paanjii2Oct 11.2022 — Good thing I never bothered learning client side programming no matter how much the world was advertising fore me to learn javascript. I hated it and ignored it for nearly 2 decades. And those who learnt it. Now look at them, they are crying they wasted brain cells learning something that got outdated and they can't make use of the outdated functions anymore.


**Links removed by Site Administrator so it doesn't look like you're spamming us. Please don't post them again.**
×

Success!

Help @novice2022 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...