Hello guys. I'm having a small issue. I'm loading a page using $.ajax, the loaded page has an html form on it and I would like that form to work without any kind of JS, sadly it doesn't, is there any work around to avoid sending the form's content via ajax?
Hello guys. I'm having a small issue. I'm loading a page using $.ajax, the loaded page has an html form on it and I would like that form to work without any kind of JS, sadly it doesn't, is there any work around to avoid sending the form's content via ajax?
I need some help with a sprintf function, when using it on a multi language platform, sometimes the word change between them, thus the values are in the wrong place, is there a way to trick this?
I'm trying to allow accent characters into #hashtags, however I haven't managed to make it working, this is what I tried: preg_match_all('/(^|[^a-z0-9_])#([a-z0-9_]+)/ui', $message, $matches); anyone have any clue what I could try?
Could you please tell me which would be faster, I have a column called Read, which can hold 0 [unread] and 1 [read], when I update the table, should I use set read = '1' or set read = '1' where read = '0'
@DaveRandom: thank you, I guess I'm going to use UNION, just one last question, as far as I can see, if I have 10 unique ID's, I'll have to UNION 10 SELECT queries, is this faster than putting them into a foreach($array as $unique_ID) : do query ?
@DaveRandom: In the GROUP BY statement you provided me I can see that each post got 2 comments, but only 1 is displayed, I tried to limit them to 3 but with no luck, is that possible?
@Ihsan, for example I have the following, SELECT * FROM comments WHERE IN (13, 20, 15) ... what I need, is the first 3 match for 13, 20 and 15, and LIMIT won't do it
For example, $array1 = array('one', 'two', 'three'); $array2 = array('three', 'four', 'five'); this would return false, while if $array1 = array('three', 'four'); return true
Is there any way of checking if the keys from $array1 exists in $array2? (array one will have an amount of keys while the 2nd one will differ) array_diff_key doesn't do the job, neither array_key_exists because I need to compare between two arrays.
Is there any way of checking if the keys from $array1 exists in $array2? (array one will have an amount of keys while the 2nd one will differ) array_diff_key doesn't do the job :(
@Jocelyn the thing is that the fields and values are in one single variable, it can't be used like SET ? (where ? will get my_field = 'value', my_field2 = 'value2', etc.)
@Jocelyn You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1
I have a problem with a prepared statement, here is my code:
function query_array($table, $data) {
foreach ($data as $column => $value) {
$columns[] = sprintf("`%s` = '%s'", $column, $this->db->real_escape_string($value));
}
$column_list = join(',', $columns);
// Prepare...