SQL change part of a string

Back to homepage

SQL change part of a string

  UPDATE Table_Name SET Column_Name = REPLACE(Column_Name, ‘Text_To_Be_Replaced’, ‘New_Text’) WHERE Column_Name LIKE ‘%Text_To_Be_Replaced%’

Read More

tribe events calendar – change hover month event

I wanted to display also the venue – location name in the tooltip from the calendar The file that needs to be changed is: /wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php you find the line: $json[‘excerpt’] = tribe_events_get_the_excerpt( $event ); and change it to: $json[‘excerpt’] = tribe_get_venue($event).” “.tribe_events_get_the_excerpt(

Read More

Tribe events sidebar widget list – increase number of events displayed

I wanted more than 10 events to be displayed. The file that need to be changed is: wp-content/plugins/the-events-calendar/src/admin-views/widget-admin-list.php at line 20 we have: <?php for ( $i = 1; $i <= 10; $i ++ ) { you can change the number

Read More

Display the thumbnail of a custom field picture

we take the id picture of the custom field: $id_picture = get_post_meta( get_the_ID(),’image_1′ ,true ) $image1 = wp_get_attachment_image($id_picture, ‘thumbnail’);    

Read More

Loop custom posts in wordpress

<?php $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query(‘showposts=6&post_type=name_custom_post’.’&paged=’.$paged); if ($wp_query->have_posts()) : ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <div class=”entry”> <h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> </div> <?php endwhile; ?> <div class=”navigation”> <div

Read More

Laravel Class not found

i tried lots of things… and after 2 hours here is the solutions php artisan config:cache composer dump-autoload php artisan cache:clear php artisan view:clear And be sure to declare the class in app.cfg

Read More

Create a shortcut key to submit a form

I want to create a shortcut key(ctrl+s) to submit the form:   so i have the form: <form action=”action_page.php” id=”editForm”> <fieldset> <legend>Personal information:</legend> First name:<br> <input type=”text” name=”firstname” value=”Mickey”><br> Last name:<br> <input type=”text” name=”lastname” value=”Mouse”><br><br> <input type=”submit” value=”Submit”> </fieldset> </form>

Read More

Disable autofocus input

$(function(){ $(‘input’).blur(); });

Read More

Create a controller with populated with all the functions a

#php artisan make:controller FlyersController –resource the result is that you will have a controller with all the functions created: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; class FlyersController extends Controller { /** * Display a listing of the resource. *

Read More