For example. I have a select statement that is "select ID from students where student name ='name';"

Now I don't wanna echo the student ID but I wanna store it in various where I can reuse it. How do I do it.

"select ID from students where student name ='name';"

Then you will need to first declare a global variable then within your select statement assign this variable with the selected student name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.