Search Results

Search found 446 results on 18 pages for 'sergio oliveira jr'.

Page 12/18 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • mysql union query

    - by Sergio
    The table that contains information about members has a structure like: id | fname | pic | status -------------------------------------------------- 1 | john | a.jpg | 1 2 | mike | b.jpg | 1 3 | any | c.jpg | 1 4 | jacky | d.jpg | 1 Table for list of friends looks like: myid | date | user ------------------------------- 1 | 01-01-2011 | 4 2 | 04-01-2011 | 3 I want to make a query that will as result print users from "friendlist" table that contains photos and names of that users from "members" table of both, myid (those who adding) and user (those who are added). That table in this example will look like: myid | myidname | myidpic | user | username | userpic | status ----------------------------------------------------------------------------------- 1 | john | a.jpg | 4 | jacky | d.jpg | 1 2 | mike | b.jpg | 3 | any | c.jpg | 1

    Read the article

  • Jquery stop load function after too many clicks

    - by Sergio
    How can I stop loading function after user is clicked too many times on link? Jquery code looks like: $(document).ready(function(){ $(".menu_rfr").click(function() { $("#main").html('<img src="img/spin.gif" class="spin">'); location.replace($(this).attr('rel')); }); $(".menu_clickable").click(function() { $("#main").html('<img src="img/spin.gif" class="spin">'); $("#main").load($(this).attr('rel')); }); });

    Read the article

  • Zend Framework: Zend_DB Error

    - by Sergio E.
    I'm trying to learn ZF, but got strange error after 20 minutes :) Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'Configuration array must have a key for 'dbname' that names the database instance' What does this error mean? I got DB information in my config file: resources.db.adapter=pdo_mysql resources.db.host=localhost resources.db.username=name resources.db.password=pass resources.db.dbname=name Any suggestions? EDIT: This is my model file /app/models/DbTable/Bands.php: class Model_DbTable_Bands extends Zend_Db_Table_Abstract { protected $_name = 'zend_bands'; } Index controller action: public function indexAction() { $albums = new Model_DbTable_Bands(); $this->view->albums = $albums->fetchAll(); } EDIT All codes: bootstrap.php protected function _initAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => '', 'basePath' => dirname(__FILE__), )); return $autoloader; } protected function _initDoctype() { $this->bootstrap('view'); $view = $this->getResource('view'); $view->doctype('XHTML1_STRICT'); } public static function setupDatabase() { $config = self::$registry->configuration; $db = Zend_Db::factory($config->db); $db->query("SET NAMES 'utf8'"); self::$registry->database = $db; Zend_Db_Table::setDefaultAdapter($db); Zend_Db_Table_Abstract::setDefaultAdapter($db); } IndexController.php class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { $albums = new Model_DbTable_Bands(); $this->view->albums = $albums->fetchAll(); } } configs/application.ini, changed database and provided password: [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 db.adapter = PDO_MYSQL db.params.host = localhost db.params.username = root db.params.password = pedro db.params.dbname = test models/DbTable/Bands.php class Model_DbTable_Bands extends Zend_Db_Table_Abstract { protected $_name = 'cakephp_bands'; public function getAlbum($id) { $id = (int)$id; $row = $this->fetchRow('id = ' . $id); if (!$row) { throw new Exception("Count not find row $id"); } return $row->toArray(); } }

    Read the article

  • Date javascript object from IE cannot be automatically bound to Datetime in ASP.NET MVC

    - by Sergio
    Hi There, I have a site that uses a jquery calendar to display events. I have noticed than when using the system from within IE (all versions) ASP.NET MVC will fail to bind the datetime to the action that send back the correct events. The sequence of events goes as follows. Calendar posts to server to get events Server ActionMethod accepts start and end date, automatically bound to datetime objects In every browser other than IE the start and end date come through as: Mon, 10 Jan 2011 00:00:00 GMT When IE posts the date, it comes through as Mon, 10 Jan 2011 00:00:00 UTC ASP.NET MVC 2 will then fail to automatically bind this to the action method parameter. Is there a reason why this is happening? The code that posts to the server is as follows: data: function (start, end, callback) { $.post('/tracker/GetTrackerEvents', { start: start.toUTCString(), end: end.toUTCString() }, function (result) { callback(result); }); },

    Read the article

  • Do you think it's a good idea to create a login box as a user control?

    - by Sergio Tapia
    Hi there guys! I'm starting out learning some ASP.Net programming and I'm going to be making a little community website for my friends and myself. I'm trying to pick up some good habits along the way. I was thinking of having a usercontrol and have that 'loginBox' shows the appropriate textboxes and login button, but also show his username when he is logged in. Do you think I should handle this as a user control or am I missing something as an ASP.Net newbie?

    Read the article

  • Help me choose a web development framework/platform that will make me learn something

    - by Sergio Tapia
    I'm having a bit of an overload of information these past two days. I'm planning to start my own website that will allow local businesses to list their items on sale, and then users can come in and search for "Abercrombie t-shirt" and the stores that sell them will be listed. It's a neat little project I'm really excited for and I'm sure it'll take off, but I'm having problems from the get go. Sure I could use ASP.Net for it, I'm a bit familiar with it and the IDE for ASP.Net pages is bar-none, but I feel this is a great chance for me to learn something new to branch out a bit and not regurgitate .NET like a robot. I've been looking and asking around but it's all just noise and I can't make an educated decision. Can you help me choose a framework/platform that will make me learn something that's a nice thing to know in the job market, but also nice for me to grow as a professional? So far I've looked at: Ruby on Rails Kohana CakePHP CodeIgniter Symfony But they are all very esoteric to me, and I have trouble even finding out which IDE to use to that will let me use auto-complete for the proprietary keywords/methods. Thank you for your time.

    Read the article

  • Jquery post and get data from PHP

    - by Sergio
    Jquery code looks like: $('#gal').rating('gl.php?gal_no=<?=$gal_no;?>&id=<?=$id;?>', {maxvalue:10,increment:.5, curvalue: <?=$cur;?>}); PHP code: $br=mysql_query("SELECT count(gal) as total FROM ...") if ... { echo '0'; } else echo '1'; } Jquery code successfully transmitted data to PHP script and when the PHP done with checking data echo the result ('1' or '0'). How can I get this PHP result back to Jquery and based on them write a message? Some thing like: if(data=="1") { $("#error").show("fast").html('not correct').css({'background-color' : '#F5F5F5','border-color' : '#F69'}); }else{ $("#error").show("fast").html('correct').css({'background-color' : '#FFF','border-color' : '#3b5998'}); }

    Read the article

  • How to stop Jquery load function

    - by Sergio
    The Jquery load function don't stop if there is multiple click on the links in the menu. The jquery code looks like: $(document).ready(function(){ $(".menu_rfr").unbind("click").click(function() { $("#main").html('<img src="img/spin.gif" class="spin">'); location.replace($(this).attr('rel')); }); function handleClick() { $(this).unbind("click"); $("#main").html('<img src="img/spin.gif" class="spin">'); $("#main").load($(this).attr('rel'), function() { // reactivate it after some loading has completed $(this).click(handleClick); }); } $(".menu_clickable").click(handleClick); }); You can see the sample page at link text How can I prevent users clicks if the DIV content is not loaded completely and never ending DIV loading?

    Read the article

  • How to change filetype association in the registry?

    - by Sergio Tapia
    Hi there, first time posting in StackOverflow. :D I need my software to add a couple of things in the registry. My program will use Process.Start(@"blblabla.smc"); to launch a file, but the problem is that most likely the user will not have a program set as default application for the particular file extension. How can I add file associations to the WindowsRegistry?

    Read the article

  • How to select the first element of a set with JSTL?

    - by Sergio del Amo
    I managed to do it with the next code but there must be an easier way. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <c:if test="${fn:length(attachments) > 0}"> <c:forEach var="attachment" items="${attachments}" varStatus="loopCount"> <c:if test="${loopCount.count eq 1}"> attachment.id </c:if> </c:forEach> </c:if>

    Read the article

  • Access denied when trying to access my database.

    - by Sergio Tapia
    Here's my code: <html> <head> </head> <body> <?php $user = mysql_real_escape_string($_GET["u"]); $pass = mysql_real_escape_string($_GET["p"]); $query = "SELECT * FROM usario WHERE username = '$user' AND password = '$pass'"; mysql_connect(localhost, "root", ""); @mysql_select_db("multas") or die( "Unable to select database"); $result=mysql_query($query); if(mysql_numrows($result) > 0){ echo 'si'; } ?> </body> </html> And here's the error I get when I try to run it Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\useraccess.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\xampp\htdocs\useraccess.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\useraccess.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\xampp\htdocs\useraccess.php on line 8 Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\useraccess.php on line 16

    Read the article

  • Jquery and PHP rating function problem

    - by Sergio
    I know that I was already posted similar question but I just can't find the answer and figure it out how to solve this problem. I'm trying to customize Jquery Star Rating plugin (link text) but I do not know what to do to show the message based on response of PHP script. Jquery script successfully send rating data to PHP scripts that query the database and based on that echo message of proper or improper rating. What should I add to an existing JS code so I can get echo from PHP and base on that write a message on some DIV beside rating star? Jquery: $('#gal').rating('gl.php?gal_no=<?=$gal_no;?>&id=<?=$id;?>', {maxvalue:10,increment:.5, curvalue: <?=$cur;?>}); Simplified PHP code: $br=mysql_query("SELECT count(gal) as total FROM ...") if ... { echo '0'; } else echo '1'; } Jquery code successfully transmitted data to PHP script and when the PHP done with checking data echo the result ('1' or '0'). How can I get this PHP result back to Jquery and based on them write a message? Something like: if(data=="1") { $("#error").show("fast").html('not correct').css({'background-color':'#F5F5F5','border-color' : '#F69'}); }else{ $("#error").show("fast").html('correct').css({'background-color' : '#FFF','border-color' : '#3b5998'}); } If someone has an idea...I would appreciate it.

    Read the article

  • If I register a domain name using a service like A Small Orange, how can I know they are registering

    - by Sergio Tapia
    I have a great name for a website and it's available, but I don't really know how to register a domain name using a barebones website; that's why I want to use A Small Orange-like service. My question is, is it standard procedure to register the name on YOUR(the costumers) behalf, or do companies set it up on their name so they can profit from hits if in the future you stop paying for the hosting?

    Read the article

  • What is the best way to handle my softwares licenses?

    - by Sergio Tapia
    By best I mean more time tested, easier to implement and easier for the users to work with. I do not want my licensing crap to interfere with their work. I was thinking of launching a WCF service that check with my license DB if it's a valid license and if it is, send a True. If the returned response is False, then shut down the program after telling them to fix their license. Do you think this is a good way to handle it?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18  | Next Page >