Categories
CMS Development Wordpress

dbDelta not CREATING TABLE

Here’s my code. Please help function lapizzeria_database() { global $wpdb; global $lapizzeria_db_version; $lapizzeria_db_version = “1.0”; $table = $wpdb->prefix . ‘reservation’; $charset_collate = $wpdb->get_charset_collate(); //SQL Statement $sql = “CREATE TABLE $table ( id mediumint(9) NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, date datetime NOT NULL, email varchar(50) DEFAULT ” NOT NULL, phone varchar(10) NOT NULL message […]

Categories
Development

Return mixed non-series items + next upcoming in series

I’m looking for the best way to handle the following query. I have a table of items, some (but not all) of which are part of a series of items (one per day). The ones in a series are grouped by a shared series ID: Table “items”: id series_id (may be NULL) title date etc. […]

Categories
Development MySQL

Simulate Moving Timeline with MySQL Query

I’m trying to Simulate a Timeline using a MySQL Query based on the following table structure just an example drop table if exists testing; create table testing ( idno integer not null auto_increment, date datetime not null, primary key (idno) ); insert into testing values (default, ‘2019-08-25’), (default, ‘2019-09-01’), (default, ‘2019-09-05’), (default, ‘2019-09-10’), (default, ‘2019-09-15’), […]