Search Results

Search found 31200 results on 1248 pages for 'field service'.

Page 114/1248 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • MySQL: Search for a field, then replace another field in the same row.

    - by Francisco
    Sorry if the question is stupid but I'm newbie to MySQL and got stuck with this. Let's suppose I have the following table in MySQL: City.........Country.....Restaurants Rome......Italy.............3032 Paris.......France........5220 I want to search for the city "Paris" and update the field "Restaurants" (replace 5220 with 5300). What would be the right MySQL query? Thanks in advance!

    Read the article

  • Problem with PHP; Posting Hidden Value!!?

    - by Derek
    Hi, I have a page which basically allows an admin user to create manager user types (basically a register function. So when the values are submitted, they are stored into the DB, very very basic stuff. However, I have a hidden variable type..reasons are I have 3 different user levels and I have declared they identification as an integer (e.g. 7 = manager, 8 =user etc.) Can someone help me out with how to correctly pass this hidden value so it stores in the database... Here is my form: <form id="userreg" name="userreg" method="post" action="adminadduser-process.php"> <label>Full Name:</label> <input name="fullname" size="40" id="fullname" value="<?php if (isset($_POST['fullname'])); ?>"/> <br /> <label>Username:</label> <input name="username" size="40" id="username" value="<?php if (isset($_POST['username'])); ?>"/> <br /> <label>Password:</label> <input name="password" size="40" id="password" value="<?php if (isset($_POST['password'])); ?>"/> <br /> <label>Email Address:</label> <input name="emailaddress" size="40" id="emailaddress" value="<?php if (isset($_POST['emailaddress'])); ?>"/> <br /> <input name="userlevel" type="hidden" size="1" id="userlevel" value="<?php $_POST[5]; ?>" /> <br /> <input value="Add User" class="addbtn" type="submit" /> </form></div> Next, here is the script that runs the query: <?php require_once "config.php"; $fullname = $_POST['fullname']; $username = $_POST['username']; $password = $_POST['password']; $emailaddress = $_POST['emailaddress']; $userlevel = $_POST[5]; $sql = "INSERT INTO users_tb VALUES('".$user_id."','".$fullname."','".$username."',MD5('".$password."'),'".$emailaddress."','".$userlevel."')"; $result = mysql_query($sql, $connection) or die("MySQL Error: ".mysql_error()); header("Location: adminhome.php"); exit(); ?> I'm basically trying to pass the hidden typem with a constant value of '5' just for this form, as it will not be changed...also while im here, for some reason, the 'fullname' is not stored in the DB either!!?? WTH?? all other fields are processed fine. Any help is much appreciated! Thank you.

    Read the article

  • Get values from DB field into an array with PHP

    - by Adnan
    Hello, I have a field in my DB that holds value separated by commas like; $tmp_list = "COB,ISJ,NSJ," Now when I fetch that the row, I would like to have them in an array. I have used array($tmp_list) but I get the values in one line only like: [0] => 'COB,ISJ,NSJ,' instead of [0] => 'COB', [1] => 'ISJ', [2] => 'NSJ' All help is appriciated.

    Read the article

  • Select distinct values from a table field

    - by alj
    I'm struggling getting my head around the Django's ORM. What I want to do is get a list of distinct values within a field on my table .... the equivalent of one of the following: SELECT DISTINCT myfieldname FROM mytable (or alternatively) SELECT myfieldname FROM mytable GROUP BY myfieldname I'd at least like to do it the Django way before resorting to raw sql.

    Read the article

  • Change an autoincrementing field to one previous

    - by jlan
    One day, wordpress suddenly jumped from pots id 9110 to 890000000 post. Days later I'd like to move back new posts to continue from id 9111. I'm sure that id will never reach id 890000000, no problem here, but id is an autoincrement field and "ALTER TABLE wp8_posts AUTO_INCREMENT =9111" is not working. Can I force id to continue from 9111 ?

    Read the article

  • Reading XML or objects from a Web service

    - by Shawn
    This is my first time working with webservices and I am a bit lost. I successfully called the functions, but I only can get one value from the service. I read that the easiest way is to read xml or create objects and then call their values. Currently I use functions that return the desired value but I need to call them 3 times to get all the data witch is a waste of time and resources. I tried to call the service with the URL and use it as a website or getting the service to work the same way without importing into the program. The thing is that i cant find a way to pass the values into the url, because of that i get only blank pages. What is the fastest way to get my data from the services? I need city name, temperature and a flag if the city is valid. I need to pass the zip code to the service. Thank you. My current code wetther.Weather wether = new wetther.Weather(); string farenhait = wether.GetCityWeatherByZIP(zip).Temperature; string city = wether.GetCityWeatherByZIP(zip).City; bool correct = wether.GetCityWeatherByZIP(zip).Success; I tried it that way // Retrieve XML document XmlTextReader reader = new XmlTextReader("http://xml.weather.yahoo.com/forecastrss?p=94704"); // Skip non-significant whitespace reader.WhitespaceHandling = WhitespaceHandling.Significant; // Read nodes one at a time while (reader.Read()) { // Print out info on node Console.WriteLine("{0}: {1}", reader.NodeType.ToString(), reader.Name); } This one works for the yahoo page but not for mine. I need to use this webservice - http://wsf.cdyne.com/WeatherWS/Weather.asmx

    Read the article

  • Django Form field initial value on failed validation

    - by John
    Hi, how do I set the value of a field element after a form has been submitted but has failed validation? e.g. if form.is_valid(): form.save() else: form.data['my_field'] = 'some different data' I don't really want to put it in the view though and would rather have it as part of the form class. Thanks

    Read the article

  • AngularJS recursive directive with a dynamic HTML template (bounty)

    - by Nazar Sobchuk
    I have a realy hard task here. I am working on an AngularJS web app, which is capable of sending different HTTP methods to our project's Restful Web Service and receiving responses in JSON. Basicaly it looks like this: You can create some REST resource from this application. Let's say an exam. To create an exam - you pick a resource from a list of available resources. This triggers a function, that sends a request to localhost:8080/STEP/api/explain/resorceName and gets a description for this resource. Description looks like this: http://jsonblob.com/534fc022e4b0bb44248d6460 After receiving a response - I start building input fields like follows (allFields - array of field objects for this resource, enumValues - enum values for resource's field if it's property isEnum = true): <div ng-repeat="field in allFields"> <div ng-show={{!field.isEnum}}> <p ng-show={{field.isRequired}}>{{field.name}}*: </p> <p ng-show={{!field.isRequired}}>{{field.name}}: </p> <input type="text" ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()" class="form-control" placeholder="{{parseClassName(field.type)}}"> </div> <div ng-show={{field.isEnum}}> <p ng-show={{field.isRequired}}>{{field.name}}*: </p> <p ng-show={{!field.isRequired}}>{{field.name}}: </p> <select ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()" class="form-control"> <option></option> <option ng-repeat="enumValue in field.enumValues" label={{enumValue.name}}>{{enumValue.ordinal}}</option> </select> </div> </div> Now, the problem. I need to create a recursive directive, which would be capable of generating fields in such maner as described above for every resource's field that has "restResourceName" not null. To get all it's fields you just send a request to localhost:8080/STEP/api/explain/restResourceName and get similar JSON response as shown above, which is then used to build HTML elements for inputing values into model. Does anyone know how this can be achieved using angular recursive directive? Every useful answer is highly appreciated and evaluated. The correct answer will get +50 or I will start a bounty, because I'm realy stuck with this for 2 days. If you need any additional info - let me know. Thank you.

    Read the article

  • Wordpress post query php custom field conditional

    - by Andy
    Here's the situation: In wordpress I'm trying to reset a post WP_Query so that I can rewrite the post link based on whether or not a custom field exists in the post. I'm trying to give the post a NEW link in the custom field. All I've managed to do here is kill the link entirely. Any and all help is greatly appreciated, I'm pretty green to php. Here's my WP_Query: <?php $recentPosts = new WP_Query(); $recentPosts->query('showposts=3'); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <?php $attribute = the_title_attribute(); $title = the_title(); $key = 'NewPostLink'; $newLink = get_post_meta( $post->ID, $key, TRUE ); if ($newLink != '') { $theLink = get_permalink ($post->ID ); if (has_post_thumbnail()) { $image = get_the_post_thumbnail( $post->ID ); echo '<div class="thumbnailbox"><div class="thumbnail"><a href="'.$theLink.'">'.$image.'</a></div></div>'; echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } else { echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } } else { $theLink = $newLink; if (has_post_thumbnail()) { $image = get_the_post_thumbnail( $post->ID ); echo '<div class="thumbnailbox"><div class="thumbnail"><a href="'.$theLink.'">'.$image.'</a></div></div>'; echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } else { echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } } ?> <small><?php the_time('F jS, Y') ?></small> <div class="entry"> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?>

    Read the article

  • Make input field jquery ui datepicker editable

    - by Sam Vloeberghs
    Hi Folks, I've scanned trough the documentation but I can't find out how I to get the field to get the datepickers value AND let it be editable using my keyboard numpad. So filling/editing the date without using the datepicker. I hope my question is clear cause I don't know how the formulate it otherwise.. Greetings

    Read the article

  • .NET - Unable to get values from Value property of HtmlInputHidden

    - by user245123
    I have a custom control that inherits from .NET's CompositeControl class. This control overrides the CreateChildControls in order to build its child controls dynamically. I need the page to post back after a couple different javascript events occur on the client side. In order to accomplish this, I create two hidden controls on the page so I can set their values with javascript, submit the page, and read the values out on server side. Here's is the code I use to create these two hiddens: Protected Overrides Sub CreateChildControls() hdEventName = New HiddenField() Controls.Add(hdEventName) hdEventName.ID = "hdEventName" hdEventArgs = New HiddenField() Controls.Add(hdEventArgs) hdEventArgs.ID = "hdEventValue" ' other controls ' ... End Sub When a javascript event occurs I set the value attribute of the two hiddens and submit the page, like so: hdEventName.value = 'EventName'; hdEventArgs.value = 'arg1,arg2'; document.forms[0].submit(); In the OnLoad method of my control, I attempt to check the Value property of the hdEventName and hdEventArgs controls, but it is always empty. However, Page.Request.Form(hdEventName.UniqueID) and Page.Request.Form(hdEventArgs.UniqueID) return correct values. The actual HTML in the markup also shows correct values after the page posts back. Why is the Value property of the HtmlInputHiddens disconnected from the actual value that appears on the client?

    Read the article

  • Drupal: can't add the taxonomy field to Views ?

    - by Patrick
    hi, I've prepared a View for my nodes and I've selected which fields to display. I just realized that there is not the taxonomy field from Content:Taxonomy There is only Taxonomy:Term category and warning: "The content might be duplicated, use appropriate filters". Should I use this item ? What kind of filters should I use ? thanks

    Read the article

  • Unique text field in MySQL and php

    - by Jonathan
    I've created a salt using; md5(rand(0,10000000)); (there is probably a better way?) There doesn't seem to be possible to make a text field unique in MYSQL. So how do I check if the salt has already been used for a previous user? Or should I generate the salt based on the current date/time? as it is impossible for 2 users to register at exactly the same time correct?

    Read the article

  • Convert SQL Server Varbinary field to MYSQL, keeping data intact

    - by Mike Sheridan
    I was given the daunting task of converting a ASP website to PHP and SQL Server to MySQL, and I ran into an issue that hopefully somebody can help I have a user table which has a password field with datatype Varbinary(128), are using pwdencrypt to encrypt the password. Is there a way to transfer that over to MySQL, and somehow i need to be able to keep the password intact... how can i go about that? any pointers would be greatly appreciated!

    Read the article

  • Get Caret Position within an Text Input field

    - by MarkB29
    How could can I get the caret position from within an input field. I have seen a few bits and pieces on google but nothing bullet proof. Basically something like a Jquery plugin would be ideal so I could simply do $("#myinput").caretPosition() I realise there may by other non-jQuery solutions and these would also be brilliant if anyone has any??

    Read the article

  • Get value of selected field from a dropdown list

    - by 47
    I have this class in my model: class ServiceCharge(models.Model): name = models.CharField(max_length=30) amount = models.PositiveIntegerField() extends_membership = models.BooleanField(default=False) def __unicode__(self): return str(self.name) What I want to have is in the form for charging users a service charge, when a charge is selected from the dropdown menu, the two values for amount and extends_membership are updated on the form depending on the selected charge. My forms.py: class vModelChoiceField(forms.ModelChoiceField): def label_from_instance(self, obj): return "%s" % obj.name class PayServiceChargeForm(PaymentsForm): service_charge = vModelChoiceField(queryset=ServiceCharge.objects.all(), empty_label=" ") class Meta(PaymentsForm.Meta): exclude = ('member', 'payment_type', 'transacted_by', 'description') Then the form template: <table border="0"> <tr> <td><strong>{% trans "Service Charge" %}</strong></td> <td>{{ form.service_charge }}</td> <td><strong>{% trans "Extends Membership" %}</strong></td> <td>{{ form.extends_membership }}</td> </tr> <tr> <td valign="top"><strong>{% trans "Expiry Date" %}</strong></td> <td valign="top">{{ form.expiry_date }}</td> <td valign="top"><strong>{% trans "Amount" %}</strong></td> <td>{{ form.amount }}</td> </tr> </table> I was trying out some jQuery but I got stuck after getting the currently selected charge: <script type="text/javascript"> $(document).ready(function(){ $("#id_service_charge").change(onSelectChange); }); function onSelectChange(){ var selected = $("#id_service_charge option:selected"); var output = ""; if(selected.val() != 0){ charge = selected.val(); .... (update values) .... } } </script>

    Read the article

  • Form filter in symfony: imposible when a field is type "date"

    - by user248959
    Hi, anyone has tried to create a symfony form filter from a class which has a field of type "date" ? When i do it, i get this error: 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens stack trace I think the error dependens on this command: 'SELECT b.id AS b_id, b.day AS b_day FROM birthday b WHERE b.day = ? AND b.day <= ?', array('month' = '1','day' = '2', 'year' = '2014') but i dont know how can i solve it.. Any idea? Javi

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >