Forum

Thread tagged as: Question, Problem

Removing content via phpMyAdmin

Hi there, I have an unusual problem.

A recruitment company has been adding jobs for a couple of years now and we're starting to hit some problems. I used a template called jobs.html to add a new content region everytime but they now have over 9,000 jobs in one particular category and now the memory limit has been hit and I cannot delete any to make a bit of space.

I have looked at the tables in the phpMyAdmin but I am at a loss how I can search for them to delete. Below are all the bits of code I think you need.

Can you give me some guidance on where/what I should be looking for to delete amd is there a better way to add jobs to the system so they remove themselves after a particular date to save clogging up the system?

HTML

    <div class="right">
                <?php 
    $opts = array(
            'template'=>'jobs.html',
            'filter'=>'slug',
            'match'=>'eq',
            'value'=>$_GET['s']
        );
    perch_content_custom('Industrial Jobs', $opts); 
?>


    </div>

jobs.html

    <h2><perch:content id="jobtitle" type="text" label="Job Title" html="false" required="true" title="true" /></h2>

    <perch:content id="_id" suppress="true" label="Unique Job Ref ID" required="true" /> 
    <p><strong>Job Type:</strong> <perch:content id="jobtype" type="text" label="Job Type" html="false" required="true" title="false" /><br />
    <strong>Location:</strong> <perch:content id="location" type="text" label="Location" html="false" required="true" title="true" /><br />
    <strong>Salary:</strong> <perch:content id="salary" type="text" label="Salary" html="false" required="false" title="false" /></p>

    <p><strong>Qualifications:</strong> <perch:content id="qualifications" type="text" label="Qualifactions" html="false" required="true" title="false" /><br />
    <strong>Experience:</strong> <perch:content id="experience" type="text" label="Experience" html="false" required="true" title="false" /></p>

    <p><strong>Closing Date: <span class="pink"><perch:content id="date" type="date" label="Closing Date" format="%d %B %Y" required="true" /></span></strong><br />

    <p><strong>Contact Name:</strong> <perch:content id="name" type="text" label="Contact Name" html="false" required="true" title="false" /><br />
    <strong>Phone Number:</strong> <perch:content id="number" type="text" label="Phone Number" html="false" required="true" title="false" /><br />
    <strong>Email:</strong> <a href="mailto:<perch:content id="email" type="text" label="Email" html="false" required="true" title="false" />"><perch:content id="email" type="text" label="Email" html="false" required="true" title="true" /></a></p>

    <div class="apply">
        <a href="mailto:<perch:content id="email" type="text" label="Email" html="false" required="true" title="false" />?subject=<perch:content id="_id" type="text" /> <perch:content id="jobtitle" type="text" /> in <perch:content id="location" type="text" />">APPLY NOW</a>
    </div>

    <h4>More Details</h4>
    <perch:content id="details" type="textarea" label="More Details" textile="false" html="true" editor="ckeditor" />

    <perch:content id="slug" type="slug" for="_id" suppress="true" />

Chris McGuicken

Chris McGuicken 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Deleting things in the database will likely leave you in a mess.

It would be better to import the live database into your dev environment, make the changes, and then reimport it live.

I'd suggest upgrading to Runway and converting the regions to a Collection - that would help stop the issue reoccurring.

If I import the database to my dev environment am I still not going to run into the same problem of trying to access the region to delete the content?

I'll take a look at Runway now and see if this is something the client would be open to - thanks.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If the issue is running out of memory, then you should be able to just allocate more locally, as you're in control of the server.

I'm presuming you can't allocate more on your live server, otherwise that would be the obvious route.