Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdating specific area of table in postgresql
    primarykey
    data
    text
    <p>Ok I am trying to update a specific area of a table in postgresql</p> <p>I want it to find the user that goes along with the table</p> <p>and then update the information I have</p> <p>like in this case the email is the user name that it needs to look for.</p> <p>it needs to add in areas like $aboutSelf, $hobbies, $music, $tv, $sports</p> <p>so ya I have no idea how to do this lol ^.^ I only know how to add stuff from scratch. like create a non existing user</p> <pre><code>CREATE TABLE chatterprofileinfo( Id SERIAL, email VARCHAR(255) NOT NULL PRIMARY KEY, aboutSelf VARCHAR(255), hobbies VARCHAR(255), music VARCHAR(255), tv VARCHAR(255), sports VARCHAR(255), lastLogin DATE ); </code></pre> <p>The PHP im currently using</p> <pre><code>&lt;?php $error=false; $aboutSelfError=""; $hobbiesError=""; $musicError=""; $tvError=""; $sportsError=""; if($_SERVER["REQUEST_METHOD"] == "GET") { $aboutSelf=""; $hobbies=""; $music=""; $tv=""; $sports=""; $error=false; } else if($_SERVER["REQUEST_METHOD"] == "POST") { $error=false; $aboutSelf=trim($_POST["aboutSelfTA"]); $hobbies=trim($_POST["hobbiesTA"]); $music=trim($_POST["musicTA"]); $tv=trim($_POST["tvTA"]); $sports=trim($_POST["sportsTA"]); if(strlen($aboutSelf)&gt;255) { $aboutSelfError="Maximum of 255 characters please shorten"; $error=true; } if(strlen($hobbies)&gt;255) { $hobbiesError="Maximum of 255 characters please shorten"; $error=true; } if(strlen($music)&gt;255) { $musicError="Maximum of 255 characters please shorten"; $error=true; } if(strlen($tv)&gt;255) { $tvError="Maximum of 255 characters please shorten"; $error=true; } if(strlen($sports)&gt;255) { $sportsError="Maximum of 255 characters please shorten"; $error=true; } } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload