Skip to content

Tag: mysql

Preg_replace content with mysql query

I’m creating a replacement function. I have data in a db with a field ‘content’ that returns the content for a page. In that content I have a url tag like <a href=”[2]”>title</a>. The number between the [brackets] is the page_id of my pages table. I have a function ca…

Combining multiple queries into an output

With a feedback survey they can select bad, neutral or good. I want to compile the bad and good into a table. I am trying to create a tally “table” output from an ajax request to replace a …

PHP inserting value only once

I am trying to add categories in a database. Things is the script is reading the categories from a product list, therefore there are duplicate values as it’d be like reading PRODUCT NAME – DETAIL 1 – DETAIL 2 – CATEGORY Rinse and repeat. I have my code down and the insert works but it …