theme/functions.php insert won't work
-
Hi All! Okay, I’ve read all the documentation on INSERTING data. I’m working on the localhost using XAMPP. I’m adding a function to the themes/functions.php file
I made a custom table. I added it to the includes/db.php. I tried the recommened INSERT statement and every variation of it found in the documentation and around Google. I tried the QUERY statement. It just seems my query will nto run, not even the SELECT and it will NEVER INSERT a simple ONE RECORD into a ONE COLUMN table. It’s only one column for now until I get the insert working.
I hard coded the use database; insert into statement and ran it on the database itself and there are no syntax error. I do know PHP and MySQL very well, but WP has be turning even more grey! LOL
I did declare the global $wpdb and even asked it to show errors, though that won’t happen either. I emulated the WP syntax in various formats and nothing! It just won’t run any queries![Code moderated as per the Forum Rules. Please use the pastebin]
I know there are many different ways to write this function – but this is as hardcoded and verbose as I could make it to try and find the problem.
<p>Anyone??`
- The topic ‘theme/functions.php insert won't work’ is closed to new replies.