Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 22 of 22
Search took 0.09 seconds.
Search: Posts Made By: BornKillaz
Forum: PHP 11-08-2012, 02:29 PM
Replies: 2
Views: 384
Posted By BornKillaz
Thank you very much poyzn! I'll give it a...

Thank you very much poyzn!

I'll give it a try and let you know how it work. I knew it had to do something with look ahead, but I don't know much about those yet. Do you know any good tutorial?
...
Forum: PHP 11-07-2012, 11:14 PM
Replies: 2
Views: 384
Posted By BornKillaz
Question REGEX Pattern - match only if it doesn't starts with <script type="text/javascript">

Hello all!

I'm posting this at the PHP section, because I'm working it with a php function.

So I need to grab the text between these HTML tags:
Votes )</small></span> </p>
The text I need,...
Forum: MySQL 08-13-2012, 11:02 PM
Replies: 10
Views: 566
Posted By BornKillaz
Never mind, I got it! The error was in the CREATE...

Never mind, I got it! The error was in the CREATE VIEW query.

I copy and past your code and you had smf_board instead of smf_boards.

It's working just fine now. Thank you so much for your help,...
Forum: MySQL 08-13-2012, 10:54 PM
Replies: 10
Views: 566
Posted By BornKillaz
I create VIEW, but than it turns out in error: ...

I create VIEW, but than it turns out in error:
Table 'xxxxxx.onePerBoard' doesn't exist

(SELECT * FROM onePerBoard WHERE ID_BOARD = 7 ORDER BY numReplies DESC LIMIT 1)
UNION
(SELECT *...
Forum: MySQL 08-13-2012, 10:23 PM
Replies: 10
Views: 566
Posted By BornKillaz
Thank you, but I've never used CREATE VIEW...

Thank you, but I've never used CREATE VIEW before, seems a bit complicated...

However, I do believe that for my needs UNION will be better (also never use it before :o ), as this would be...
Forum: MySQL 08-13-2012, 09:55 PM
Replies: 10
Views: 566
Posted By BornKillaz
:eek: :( I guess so... I thought there...

:eek: :(

I guess so...

I thought there could be (somewhere and somehow) a DISTINCT statement I could use... I even tried ORDER BY FIELD(), but it hasn't help.

Once again, thank you very...
Forum: MySQL 08-13-2012, 09:47 PM
Replies: 10
Views: 566
Posted By BornKillaz
Hello Old Pedant and thank you for your reply. ...

Hello Old Pedant and thank you for your reply.

Yes, you are right. I don't need to really grab the ID_BOARD field in the results, but I do need to ORDER BY numReplies because I need the topics...
Forum: MySQL 08-13-2012, 09:21 PM
Replies: 10
Views: 566
Posted By BornKillaz
Select distinct ID's results from ID's within IN()

Hello!

I'm stuck with this query, it's been over two hours and I cannot figure it out how to archive my requirements. :(

Please, have a look at my query:
SELECT
m.ID_TOPIC,
...
Forum: Post a PHP snippet 07-27-2012, 01:55 PM
Replies: 0
Views: 1,291
Posted By BornKillaz
multidimensional_array_rand() - same as array_rand but for multidimensional arrays

Hi! :)

Ok, so the other day I need to randomize an array. Usually I use PHP's array_rand to archive this, however I need it for a multidimensional array, and array_rand can only deal with simple...
Forum: PHP 07-19-2012, 04:13 PM
Replies: 5
Views: 643
Posted By BornKillaz
The fact is that I've been using it for about one...

The fact is that I've been using it for about one month without any problems.

In my case, I use it to strip smiles from text when a class of mine posts my forum new topics and an excerpt to...
Forum: PHP 07-18-2012, 11:13 PM
Replies: 5
Views: 643
Posted By BornKillaz
I only need to strip the most common smiles used...

I only need to strip the most common smiles used in posts in a forum, so this is in fact working properly for my needs at this time. And I can only add new ones if needed.
Forum: Post a PHP snippet 07-18-2012, 08:55 PM
Replies: 0
Views: 825
Posted By BornKillaz
Lightbulb readable_implode() - adds the word "and" before the last array element.

Hello.

Here's a simple function of mine, similar to implode(), but with one major difference, it adds the word "and" (or any other) before the last element. Useful for comma separated words.

...
Forum: PHP 06-10-2012, 05:52 PM
Replies: 5
Views: 643
Posted By BornKillaz
Hi. Here is an updated version of my...

Hi.

Here is an updated version of my function:

/**
* strip_emotions()
*
* @param mixed $string
* @param bool $return_decoded_entities
* @return string
Forum: PHP 06-10-2012, 09:48 AM
Replies: 3
Views: 502
Posted By BornKillaz
You're welcome. As for your second issue,...

You're welcome.

As for your second issue, there is nothing wrong with it...

$folder = 'test_one';
$max_size = 600*600; // the max....
Forum: MySQL 06-10-2012, 09:32 AM
Replies: 1
Views: 415
Posted By BornKillaz
Question LEFT JOIN, no results when a WHERE in the joined table does not return true

EDIT: question solved, see bellow.


Hello all!

I'm dealing with a LEFT JOIN and I'm a little rusty in MySQL and now stuck with it because as far as I can remember in a LEFT JOIN, the results...
Forum: PHP 06-08-2012, 12:16 AM
Replies: 3
Views: 502
Posted By BornKillaz
Hi! See if this works for you. <?php ...

Hi!

See if this works for you.

<?php

$the_name = 'in.html';

if( preg_match( "/^[a-z0-9_-]{3,300}\.(.){3,6}$/i", $the_name ) ) {
Forum: PHP 06-07-2012, 08:09 PM
Replies: 5
Views: 643
Posted By BornKillaz
Lightbulb Regex to completly remove/strip emotions from a string

Hi!

I love regular expressions, but I'm a little rusty on them.

What I want to do, is to completly remove text emotions (or smilies) form a text string. At first glance, I've coming up with...
Forum: MySQL 06-07-2012, 07:48 PM
Replies: 7
Views: 670
Posted By BornKillaz
Thank you for your suggestion Fou-Lu, really...

Thank you for your suggestion Fou-Lu, really appreciated as performance and speed is always a goal of mine.
Forum: MySQL 06-07-2012, 11:05 AM
Replies: 7
Views: 670
Posted By BornKillaz
Thank you for your reply iBall. In fact the...

Thank you for your reply iBall.

In fact the -1 comes always in the same position, beginning of the string. I guess I'll use the substring function.

I'll let you know how it went.

Thank you...
Forum: MySQL 06-07-2012, 10:44 AM
Replies: 7
Views: 670
Posted By BornKillaz
Unhappy Select where in varchar array

Hi all!

Sorry for the dummy title, but this how it goes:

I have a MySQL table with a varchar field that stores values like this:
'-1,0,2,14,11,9,15'

Here is the table structure:

CREATE...
Forum: MySQL 06-06-2012, 05:33 PM
Replies: 2
Views: 378
Posted By BornKillaz
Thank you very much guelphdad, for pointing me in...

Thank you very much guelphdad, for pointing me in the right direction!

It's working now! :)
Forum: MySQL 06-06-2012, 04:23 PM
Replies: 2
Views: 378
Posted By BornKillaz
Unhappy Unknown column 't.ID_FIRST_MSG' in 'on clause'

Hello!

Can someone please open my eyes and allow me to see what's wrong with my query?

SELECT
t.`ID_TOPIC`,
t.`ID_FIRST_MSG`,
...
Showing results 1 to 22 of 22

 
Forum Jump

All times are GMT +1. The time now is 07:29 PM.