User Profile

Collapse

Profile Sidebar

Collapse
newbie93
newbie93
Last Activity: Jun 18 '12, 12:28 PM
Joined: May 11 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • newbie93
    started a topic Is something wrong with my query?

    Is something wrong with my query?

    Hey guys. I'm working on a database with 3 tables, some with overlapping information. A few columns from each table can be updated by the user via the web app that I am creating. But... There is an issue. Not sure what it is, but my updates aren't happening. I am wondering if something is wrong with my query. (Actually, after debugging, I am quite certain there is).
    Code:
    	if (empty($errors)) { 	
    		$query1 = "UPDATE owner SET
    ...
    See more | Go to post

  • newbie93
    started a topic clarification on GROUP_CONCAT()

    clarification on GROUP_CONCAT()

    Hi everyone - I need a way to turn a column in my table into a list. Basically, my table consists of: userId, name, and "role" (0 or 1). I want to write a function that outputs a list of usernames. This is what I have:
    Code:
     
             function checking_query() {
    		global $connection;
    		$query = "SELECT GROUP_CONCAT(userId) FROM owner";
    		$result = mysql_query($query, $connection);
    		confirm_query($result);
    ...
    See more | Go to post

  • hmm, yes, you are right. I will take your suggestion. Thank you
    See more | Go to post

    Leave a comment:


  • Hi, thanks for the suggestion. I ended up simply checking if 1 already exists (as opposed to if 0 exist, as the function for adding a user did)
    See more | Go to post

    Leave a comment:


  • newbie93
    started a topic Is it possible to check which fields were changed?
    in PHP

    Is it possible to check which fields were changed?

    Hello everyone,
    I am wondering if it is possible to check *which* rows were updated when a user edits a field.
    This is my problem: I have a list of users and it is important that no usernames are repeated. I have already created a function that checks if the username already exists in the database when a user is intially added. However, I am not sure how I can check if, once the username field is *updated*, if the newly updated field...
    See more | Go to post

  • newbie93
    replied to Undefined index
    in PHP
    Oh, I didn't realise that. I had assumed it was an array consisting of all the information in the database corresponding to the selected user. Is there a way I can make the user's information into an array? Thanks for your help!...
    See more | Go to post

    Leave a comment:


  • newbie93
    started a topic Undefined index
    in PHP

    Undefined index

    Hi, so this issue has been driving me crazy for the entire workday. I hope someone can help; I am sure it is trivial.
    I am trying to access a user in a database based on their id. The id is auto incremented and thus unknown to the person accessing the user. I have created the functions below for accessing user information:
    Code:
    	function get_user_by_id($user) {
    		global $connection;
    		$query = "SELECT * ";
    ...
    See more | Go to post

  • newbie93
    started a topic keeping track of user input
    in PHP

    keeping track of user input

    Hi experts,
    I am working with a table in a database (mysql) that keeps track of the users. The table fields are id, privilege (ie person's position in a committee -- a number mapping to a position name), username, and first and last name.

    The privilege field is to be a scroll-down menu. I have created a simple one in HTML (let me know if you'd like me to post code), but then I realised that the selected item will not actually...
    See more | Go to post
    Last edited by PsychoCoder; May 13 '12, 05:45 AM. Reason: Broke into paragraphs
No activity results to display
Show More
Working...