From the course: Learning phpMyAdmin
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Using a variable with a bookmarked query
From the course: Learning phpMyAdmin
Using a variable with a bookmarked query
- Bookmarks are convenient for storing frequently used queries but you might not always want to run exactly the same query. phpMyAdmin let's you construct a bookmark query that accepts a variable to change a condition or value. You do so by embedding an SQL comment inside a query. A couple of examples should show you how it works. I'm in the Up and Running database and have selected the SQL tab. In the previous video we created some bookmarked queries so I'm going to use one of those to start off with. So from bookmarked SQL query I'm going to select Budget Cars, then the View only radio button, and click Go, and that is loaded my bookmarked query into the query box. I'm going to put the variable in the WHERE clause so we need to wrap the WHERE clause in a SQL comment. And SQL comments use the same tags as CSS so just before "WHERE" we need to insert a slash and an asterisk, and then at the end of the WHERE clause, another asterisk and a slash. So, this turns the WHERE clause, the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
Performing a simple search8m 28s
-
Using query by example (QBE) to perform a simple search6m 6s
-
Finding and replacing text in a column3m 36s
-
Using QBE to set multiple conditions in a WHERE clause8m 2s
-
Joining multiple tables with QBE5m 2s
-
Building queries manually on a single table6m 48s
-
Building a query manually on multiple tables4m 3s
-
Saving frequently used queries with bookmarks7m 26s
-
Using a variable with a bookmarked query5m 37s
-
Using variables with bookmarks in phpMyAdmin 4.57m 19s
-
Using named parameters in a query4m 53s
-
Running queries from the console6m 31s
-
New Console options in phpMyAdmin 4.52m 17s
-
-
-
-