Jump to content

nik_jain

Members
  • Posts

    60
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by nik_jain

  1. This is late. SOrry my question wasn't clear. But I found that in this instance prepared statements cannot be used. The SQLITE syntax required literal that PDO driver could not just pass and there was no way of escaping. Note I could escape the parameter passing it from PHP to PDO . But could not escape it from PDO to sqlite.
  2. SQLITE has syntax like ' WHERE MATCH ( 'colname : "one two" )' //My pdo sql query $sql .= MATCH 'colname : "?" )'; $pdo->bindValue(1,$text);` But Pdo placeholders can't have quotes around them. So this does not work. I tried a million variations of the placeholder syntax "?" "" ? "" """ ? """ \" ? \" . But nothing works. Errors I get : General error: 1 near "?" | 25 column index out of range . Also for this query : MATCH ( names: ? AND categoryids: ? ) , the error is: `General error: 1 unrecognized token: ":"` Would really love some help here.. Thanks
  3. Use a DOM parser like querypath to parse the XML http://www.ibm.com/developerworks/library/os-php-querypath/
  4. Not tested, but in the last three lines in coded section $d should ( could ) be $fulo . for($fulo=$d;$fulo>0;$fulo--){ if($_POST['outcome'.$fulo] !==""){ $out=$_POST['outcome'.$fulo];break; }else{continue;} } $act=$_POST['activity'.$d]; $ind=$_POST['indicator'.$d]; $tar=$_POST['target'.$d]; and the else{continue;) is most probably not needed.
  5. Nope, I was kind of wrong about this one... lets hope I am able to get symfony..
  6. Agreed. I was quite hesitant to call it a framework, hence the word structure (some code that I can reuse) . It was obviously never meant for use by anyone other than me.. Well in my defense is the complete code of the site, not the actual 'structure' . Although I admit it doesn't even have a any kind of DB class Thanks a lot for your response. I have tried symphony in the past, will give it another shot. Though through another forum I discovered that its quite easy to get rid of blade in laravel, so I might give it a shot too! Thanks again
  7. I am PHP developer developing for the past 3-4 years, but except for CI I had always kind of struggled with any type of framework.. So I ended up not using most and just rolling my own frameworkish 'structure' . That ended up as a FANTASTIC learning experience, as I really got to understand what and how a real framework does/works. My complete source of the site wowpictures.link (which was made as a learning thing) is here: https://bitbucket.org/nikhil_jain/complete-wowpictures.link-source/src . Can someone take a quick look please . and offer suggestions / improvements / completely wrong things I did ? Secondly now I am hunting for a real framework, but I just find them too restriucitve / imposing. For instance yii seems too tied up with bootstrap, laravel like blade too much. Yii also seems to have a very specific class / method naming structure, that I find a chore to remember..etc etc. So what should I do? Learn any proper framework OR try to improve my own thingy ? I am strongly leaning towards th former option, but can't find a framework that doesn't forces random stuff no me .... Thanks
  8. two things. - Variables don't work inside single quoted strings - Since we are alreeady inside <?php tags the <?php echo $directory; ?> part doesn't require <?php and ?> . Also since we just want to join (concatenate) text , the echo is also not required. So Change $output = shell_exec('tar -czvf {$directory} <?php echo $directory; ?>'); to $output = shell_exec("tar -czvf {$directory}.tar.gz {$directory} " ) ;
  9. Thanks for attempting to help, but .... let me try and explain my question a bit more clearly. I am looking to learn pThreads as described here: https://gist.github.com/krakjoe/6437782 The above article talks a lot about synchronization / mutex / waiting / sharing / context and other unknown concepts.. These are the concepts and generally learning pthreads is the help I am looking for. Taking a real world example: class WebRequest extends Thread { public function run() { for_doc() ; echo 'Running Thread : ' . $this->getCurrentThreadId() ."\n"; } } Here the for_doc() is a factory function that creates a Object of type A class, but all calls to $this return null ( I know I didn't explain the issue well, ut I am just trying to give an idea about what confuses me about multithreading)
  10. Hello Where should I go If I know nothing about multi-threading and want to learn about pthreads . Googling for multithreading tutorials only shows non-PHP, language specific tutorials.. PS: I would really prefer a video lecture or tutorial
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.