Jump to content

[dx]

Members
  • Content Count

    719
  • Joined

  • Last visited

Community Reputation

4 Neutral

About [dx]

  • Rank
    deiks
  • Birthday 06/29/1988

Previous Fields

  • Languages
    HTML, CSS, PHP, SQL, Javascript, AJAX, jQuery

Profile Information

  • Location
    Bosnia & Herzegovina

Recent Profile Visitors

5,472 profile views
  1. Hello after long time. How are you guys? I stuck with one problem about Promises. I'm working on service which collects data from some services and join them to object to output. My current code is like: var p1 = async_thenable_method(), p2 = async_thenable_method(), p3 = async_thenable_method(); Promise.resolve([ p1, p2, p3 ]).then(function® { ... }); That's quite easy but problem is that I have also one method which is dependency for one of them so i need wait for one promise to finish, and then take that data to another method. I tried to make
  2. Hi, Long time ago since I was here. I'm trying to make auth option using token. I have middleware which connects to User model and check db and store data from User::where('token', $token)->first() to User's public var $user. So everything about it works fine, but now when I make some controller I want use that instance of model. If I add use App\User; it creates new instance of model, so my data from $user are set to null. How can I access old data? Best regards.
  3. Ingolme: http://www.bootply.com/SubWSDQsjr dsonesuk: http://www.bootply.com/qqc6UgSMrP Desktop is fine, but I need A C B order in mobile. Check images in attachment above.
  4. I'm trying but not successfully. With cols pushing/pulling it works if cols are in same row (like in example: col-3 and col-9), but for me is different.
  5. If you mean about pushing and pulling, yes I did. But can't find solution.
  6. Hello guys. In attachment you can find files / images how I need to make my design "desktop vs mobile". It can be done with pure CSS or any CSS framework. Last option I want is jQuery. Best regards.
  7. Hi guys, I'm making tasklist application. So this is my structure. Account.php class Account extends AppModel { public $hasAndBelongsToMany = array('Company'); } User can register multiples accounts, but also can be joined to multiple companies. Company.php class Company extends AppModel { public $hasAndBelongsToMany = array('Account'); public $hasMany = array('Project'); } Project.php class Project extends AppModel { public $belongsTo = array('Company'); public $hasMany = array('Task'); } Task.php class Task extends AppModel {
  8. [dx]

    Problem using PDO

    Hi, For someone with same problem. In my case error reporting don't work but I found error. Problem was in query: $query = $db->prepare("INSERT INTO utakmice (domacin, gost, broj_kola) SELECT * FROM (SELECT ?, ?, ?) AS tmp WHERE NOT EXISTS (SELECT domacin, gost, broj_kola FROM utakmice WHERE domacin = ? AND gost = ? AND broj_kola = ?) LIMIT 1"); It seems that it can proceed with duplicated columns names. Like (SELECT 20, 20, 10). If params have same value it stops. So I found other way.
  9. [dx]

    Problem using PDO

    It outputs before calling execute(), but later nothing.
  10. [dx]

    Problem using PDO

    Nothing outputed with $query->errorInfo() It should insert data in db, but it won't execute.
  11. [dx]

    Problem using PDO

    It won't output anything if I use print_r($db->errorInfo()); just after $query->execute(); :S
  12. [dx]

    Problem using PDO

    Hi, I'm managing some script so I have problem inserting new data to dbase. Here's my connection: $config = array('host' => 'localhost','username' => 'xxxx','password' => 'xxxx','dbname' => 'xxxx','charset' => 'latin2');$db = new PDO('mysql:host=' . $config['host'] . ';dbname=' . $config['dbname'] .';charset=' . $config['charset'], $config['username'], $config['password']);$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); And this is piece of code which worked for me and I didn't changed anything it just stopped to work: for ($i = 0; $i <
  13. Problem was User Model's filename. It should be just User.php
  14. Hi, I'm new with cakePHP and trying to make form validation. It just won't validate... This is my code: // Users/test.ctpecho $this->Form->create(); echo $this->Form->input('firstname');echo $this->Form->end('Test'); // UsersController.phpclass UsersController extends AppController { public function test() { if ($this->request->is('post')) { $this->User->set($this->request->data); if ($this->User->validates()) { pr('no errors'); } else { pr($this->User->validati
×
×
  • Create New...