« first day (200 days earlier)      last day (4978 days later) » 

18:08
I'm needing to connect to an MS SQL database but first need to install the correct ODBC drivers in my linux OS. I've found an ODBC SQL Server driver from easysoft but its only a trial version. Any ideas what I can use that is free to do this?
nope
the MS driver is windows only
so there is no free way to connect from linux php to MS SQL? wow, that seems like a major limitation
send a feature request to MS
@sadmicrowave Ever tried using MS Office on a non-Windows platform? Microsoft is "Windows or gtfo"
18:16
I'm not kidding. It's a limitation, but they don't publish their protocol, so the only way to implment it yourself is to reverse engineer it (which is not trivial)
but the limitation exists only when trying to find 'free' drivers...right. The ones that you can buy (e.g. easysoft's) would work right?
@sadmicrowave I don't know. Never used it
18:29
24 messages moved to bin
2 messages moved to bin
Hey all, I would like to export from a directory on server to a subversion repository. Not sure best way to do this.
exec("svn import --non-interactive $folder $repo"); ?
ok so svn export
hey
hey
what is the difference between memcache add and set?
18:36
read the docs, it explains it
thanks for response
hey
hey
if I use add, it will not add item if it already exist
and if I use set, it will set anyways?
> Memcached::add() is similar to Memcached::set(), but the operation fails if the key already exists on the server.
hey
hey
that's the difference?
as far as i understand: yes
18:37
it says it right in the docs
18:48
@ircmaxell what about freeTDS? will that not connect to SQL databases?
hey
hey
I can share Memcache class I have written
class Mem
{
    private $mem;
    public  $value;

    function __construct()
    {
        $this->mem = new Memcache;
        $this->mem->connect('localhost', 11211);
    }

    public function add_item($var_name, $var_value, $time)
    {
        $this->mem->set($var_name, $var_value, MEMCACHE_COMPRESSED, $time);
    }

    public function get_value($var_name)
    {
        $this->value = $this->mem->get($var_name);
    }

    public function delete_itam($var_name)
    {
        $this->mem->delete($var_name);
@sadmicrowave no experience
hey
hey
what do you think @ircmaxell, is it ok?
what's the point?
hey
hey
it is easier, isnt
18:51
Why should I use that over the core class?
hey
hey
I don't need every time to connect server
and write those lines
True, but you also miss out on the distributed nature of memcached
It's like writing a class, which calls a class. And both have the same functionality.
It is a kinda adapter, isn't it?
and you're hiding away useful functionality
for what I can see as no real benefit
hey
hey
18:53
I don't understand
"you're hiding away useful functionality"
?
Until it doesn't do something usefull, it's useless
well, for one, connecting to multiple servers
hey
hey
I won't need more servers at first
that's the point. Never write code that you will need to modify later unless writing it enables the later modification
here, you're just wrapping the API for what I can see as no real reason
I've just pitched for a great client, and they seem pretty happy with me, but they're asking for a full report of exactly what I'm planning for the project... How should I write this as to not give away all my ideas for free?
18:55
either use the native class, or figure out a reason to wrap it other than "to instantiate itself", and then implement that wrapper for that reason
@Greg They don't need to know how, just what
hey
hey
yeah, probably you are right
<opinion>You should encapsulate $value</opinion>
hey
hey
what do you mean?
En-cap-su-la-te
^ ^
18:58
guys, how can I populate an array from a mysql query?
i've used MAMP to install the server stuff
populate?
like let's say my query returns a table with one attribute
@Trim You already have a result array.
i want to make an array that contains each value
oh do I?
18:59
that returns an array?
Depends
@Trim No, mysql_fetch_array returns goats
lmfao
Return NULL if your query result is WRONG
sorry.
hey
hey
19:00
SO chat is so cool
it's just example code i've seen online would have while($res = mysql_fetch_array())
No, you are missing something
i mean of course i'd need the query in the ()
It may work
okay well now I am getting something.
ughhh why is it not giving me the entire array as it should be..
19:09
umm, this may seem like a retarded question, but how can you not overdesign?
think about it
@ircmaxell Wasn't that the original problem? Connecting idea by thinking about it?
Well, no seriously. Think about it (outloud here)
But...my ideas stink. They're my shame until they can be recognized as features.
I'm trying to help you.
think about it out loud. Walk yourself through it.
start by identifying the problem. What is it you're trying to avoid?
19:21
Well, it's really overcomplicating stuff. I received a challenge to write a decent blog system...
@ircmaxell elephpant/rubberduck debugging?
So hacking together a table and simple admin panel, I started thinking about customization (e.g. making your own CSS, changing markup directly...)
Then about how plugins can integrate with core functionality.
@Gordon Exactly
And then my brain exploded
Rubber duck debugging, Rubber Ducking, or the Rubber Duckie Test is an informal term used in software engineering to refer to a method of debugging code. The name is a reference to an apocryphal story in which an unnamed expert programmer would keep a rubber duck by his desk at all times, and debug his code by forcing himself to explain it, line-by-line, to the duck. The process is to meticulously explain code to an inanimate object, such as a rubber duck. It is expected that when the programmer comes across a piece of code that is incorrect, they will realize this Similar terms *Cardbo...
19:23
And I realized I should stop overdesigning and do stuff. Then I failed and came here.
Ok, so what is overdesigning
@Zirak just KIS
@Gordon forgot last S ^^
@Gordon See two steps before coming here
@Robik I prefer to omit the last S
19:24
@Gordon Good idea
@ircmaxell Taking a current problem and thinking how it should look like in n amount of time, or how it will interact with other solutions in an n amount of time. Maybe...
@Zirak more abstract
@ircmaxell Taking a problem too close to the end solution
Well, not really
Enlighten me
19:27
Taking a current problem and expanding it to try to solve a yet-unknown problem (basically inventing problems and trying to solve them in with the current solution)
since you don't know what other solutions you want to interact with, or how it should look in a year. You just know what you want it to do now
follow?
Yeah, but the new problems are still problems...I fail at ignoring them in the present.
Well, that's the ticket
If you want to vet a design against over-engineering, stop and identify the current problem it's trying to solve
Already been identified. But the looming possibilities make me think "well, then this has to be changed..."*50
Well, that's the decision you need to make
does the possibility justify including it in the problem scope, ignoring the code
not from a standpoint of "This is easy to program, let me do it", but from a stand point of "Should the app have this feature"
erm, nope.*49
19:33
?
It's not worth to include most of what I was thinking of.
Then there's your answer
Well yeah, but the problem is constantly thinking about the other problems and how they affect the current problem, even if they're not relevant.
        $query = mysql_query("SELECT TYPE FROM pizza WHERE size=\"$selected_radio\"")
@Zirak dicipline
@Trim good god. SQL Injection much?
19:36
@ircmaxell QQ
if $selected_radio is a string with either L or S as its value, and my relation, pizza, has type pizza and L or S for size..
putting that query in a mysql_fetch_array() should return a list of pizza types right?
Well, so you think
wait whats SQL injection?
SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another. SQL injection attacks are also known as SQL insertion attacks. Forms of the vulnerability Inc...
@Trim It's when users own your database by passing unfiltered SQL commands to your commands
19:40
its a local database, and it's for a class project where we create a database and create a php interface
Tek
Tek
@Trim Basically people can hack your database with that code
Like: "SELECT * FROM nukeDb WHERE id=".$_GET['input']
Imagine when input is "1 OR 1=1"
Selects everything
true, but i control that variable...force it to be L or S with my code.
but that should return a table containing all types of pizza at that specific size correct?
because right now it's only returning one type of pizza, and it's for both L and S sizes.
Ron
Ron
I got the following line to linkify text > '$text = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $text);' but it only linkify with http:// at the beginning. I want to linkify text with www. (without http://) also.. how can I do that?
20:04
got it. i had to put it into the while() and array_push() each item from $row onto another array.
20:37
lolwut? http://msdn.microsoft.com/en-us/library/ms859728.aspx
>Must be zero, or equal to MAPI_UNICODE. In either case, however, this parameter is ignored.
Hello, Can anybody here please help me with .htaccess redirects?
I need to redirect all "assets/images/certificates/***.jpg" to "certificate.php"
And this is my current htaccess
`RewriteEngine on

RewriteRule ^([a-z]{2})/([0-9]{1,2})/(product_specification\.php)$ $3?language=$1&id=$2 [QSA,L]

RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^([a-z]{2})/(.*) $2?language=$1 [L]`
 
3 hours later…
23:58
guys if i make a drop down box, how can I get the value selected from that dropdown box??

« first day (200 days earlier)      last day (4978 days later) »