Skip to content

SHOW COLUMNS from multiple tables

I am trying to get the column names from 2 tables. I tried a query like: (SHOW COLUMNS FROM users) UNION (SHOW COLUMNS FROM posts) but that does not work & returns a syntax error. I tried the same query using DESCRIBE but that did not work either. How can I get all the column names from multiple tables in

converting to PDO, problems

So I am working on converting an old tutorial I did a while back from mySQL to PDO. This way I can better understand the concepts. I seem to of run into a wall however. The following function is …

WP_SITEURL variable issue

I need to upload a fully working WordPress website to some online OVH hosting On localhost, the files are stored in a “wordpress/” subdirectory, whereas online they are stored in the root “www/” …

File Not Found when running PHP with Nginx

Recently I installed the latest version of Nginx and looks like I’m having hard time running PHP with it. Here is the configuration file I’m using for the domain: } Here is the error I’m getting on the error log file: Answer Try another *fastcgi_param* something like

Can I add a base64 image to the $_FILES array?

Is there a way to add a base64 image string to the $_FILES array (the array that you get when you upload a file)? Basically, I want to fake a file upload from a base64 string. The base64 string comes from an email attachment. I don’t wish to use file_get_contents(), because I want to save the image in a datab…

Display table values vertically while keeping table structure

Been checking out other ways used to order array values vertically for use in a table but most of them were the equivalent of flipping your table 90 deg to the right. I’ve been trying to think of a way to properly implement this but I think I need some help. For example, the table (horizontal order): Is…

PHP Cleaning special characters from string

so I made this scraper and it returns strings from multiple sites. I want to check if the strings match, so I use php to clean the string and check. However, the & and other special characters appear in 2 ways, one as & and the other as &. How do I go about removing each type. I already have