Jump to content
Stef's Coding Community
  • Member Statistics

    36,623
    Total Members
    3,995
    Most Online
    derekweaver
    Newest Member
    derekweaver
    Joined
  1. Community Lounge and FAQ

    1. Forum News

      General news about what we are doing around here.

      156
      posts
    2. Open Forum

      The place to talk about your cat, favorite coffee ... anything really! It's the OPEN forum after all! :D

      3.7k
      posts
    3. New Members Forum - Start Here!

      New Member Help Forum - Read this First!!

      353
      posts
  2. StudioWeb

    1. StudioWeb

      StudioWeb is the most advanced code training platform out there today. Since 2011, StudioWeb has taught well over 1 million students real-world coding and programming. We currently offer career oriented courses in the following in demand languages:

      • HTML5
      • CSS3
      • JavaScript
      • Python 3
      • PHP 7
      • SQL
      233
      posts
    2. 3
      posts
    3. StudioWeb Projects

      Updates and discussions about the StudioWeb project tutorials.

      9
      posts
  3. Programming

    1. Python

      Talk about the Python programming language.

      109
      posts
    2. Javascript

      Javascript, Ajax and jQuery

      1.6k
      posts
    3. 6.1k
      posts
  4. Entrepreneurship, Business and Marketing

    1. Social Media Marketing & Web Marketing

      Talk about promoting on the Web using social media sites like Facebook, twitter, Pinterest and good old email.

      92
      posts
    2. Entrepreneurship

      This forum is about entrepreneurship - the process of designing, launching and running a new business. 

      46
      posts
    3. Career Questions - Asked and Answered

      I get career questions, every so often, so if you have coding, programming or business related career and freelancing questions, this is the forum!

      32
      posts
  5. Web Design

    1. Beginners Web Design

      No web design question is too simple - for total beginners! :D

      8.7k
      posts
    2. HTML/XHTML

      Post questions on: HTML and HTML5. Modern web designers don't use XHTML in 2017 ... XHTML retired to Florida in 2012. ;)

      1.4k
      posts
    3. 833
      posts
    4. CSS

      Post questions on: CSS, CSS3, CSS layouts ... anything CSS! :D

      4.7k
      posts
    5. 1.8k
      posts
    6. 730
      posts
    7. 272
      posts
  6. Miscellaneous

    1. Cybersecurity

      Cyber security, also referred to as information technology security, focuses on protecting computers, networks, programs, and data from unintended or unauthorized access, change, or destruction.

      296
      posts
    2. 285
      posts
    3. Blogs and CMS

      Wordpress, Drupal, CMS Made Simple and others.

      1.1k
      posts
    4. 69
      posts
    5. 1.2k
      posts
    6. 42
      posts
    7. Web Design Jobs

      A place to post full time jobs, contract work or any specific web design and web programming projects where you need to hire a web professional.

      66
      posts
  7. Archives

    1. 167
      posts
    2. 22
      posts
    3. 97
      posts
    4. 466
      posts
    5. CSS

      8
      posts
    6. 7
      posts
    7. 360
      posts
    8. ASP

      91
      posts
    9. General Programming

      This is the place to ask about:

      • FaceBook API
      • Twitter API
      • PayPal API
      • Stripe API

      ... Or whatever else.

      324
      posts
    10. 12
      posts
    11. 195
      posts
    12. Beginners Ruby

      If you are new to Ruby, this is the forum for you. If you are an old Ruby master, then please help!! :)

      9
      posts
    13. 21
      posts
  • Who's Online   0 Members, 0 Anonymous, 12 Guests (See full list)

    There are no registered users currently online

  • Posts

    • Hello, I have started learning JS recently and I am in love with it. Although , I do not know how I should approach going forward. I want to get a job in front end development and I target to learn REACT after i am done with JS basics. Any kind of guidance will be really appreciated.      
    • Why doesn't Python create something that would combine the Python shell and the py file ?
    • It worked when I did it today. Changed from INT to Varchar.   But another thing. In the next lesson I was trying to insert an UPDATE-statement. But for some reason this will return: SQL query: Copy UPDATE people SET name = ”Jimmy the Frog” WHERE id = 3     MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'the Frog” WHERE id = 3' at line 2 I don't know why that happens but this is a screenshot of the options I had picked before I pasted the UPDATE statement:      
    • Hello im getting this error: Fatal error: Uncaught Error: Call to a member function prepare() on null in D:\wamp\www\shop\app\models\m_categories.php on line 35 here is my code for m_categories.php <?php /* Categories Handles all tasks related to retrieving and displaying categories */ class Categories { private $Database; private $db_table='categories'; function __construct() { global $Database; $this->Database=$Database; } /* Settting/Getting categories from database */ /** * Return an array with category information * * @access public * @param int(optional) * @return array */ public function get_categories($id=NULL) { $data=array(); if($id != NULL) { // get specific category if($stmt=$this->Database->prepare("SELECT id, name FROM" . $this->db_table . " WHERE id=? LIMIT 1")) { $stmt->bind_param("i", $id); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($cat_id,$cat_name); $stmt->fetch(); if($stmt->num_rows > 0) { $data=array('id'=>$cat_id, 'name'=>$cat_name); } $stmt->close(); } } else { // get all categories if($result=$this->Database->query("SELECT * FROM" . $this->db_table . "ORDER BY name")) { if($result->num_rows>0) { while($row=$result->fetch_array()) { $data[]=array('id'=>$row['id'], 'name'=>$row['name']); } } } } return $data; } } ?> and init.php <?php /* INIT Basic configuration settings */ // connect to database $server='localhost'; $user='root'; $pass=''; $db='shop'; $database=new mysqli($server,$user,$pass,$db); // error reporting mysqli_report(MYSQLI_REPORT_ERROR); ini_set('display_errors', 1); // setup constants define('SITE_NAME', 'Online Store'); define('SITE_PATH','http://shop/'); define('IMAGE_PATH','http://shop/resources/images/'); // include objects include('app/models/m_template.php'); include('app/models/m_categories.php'); // create objects $template= new Template(); $categories= new Categories(); session_start(); and index.php: <?php include('app/init.php'); echo "<pre>"; print_r($categories->get_categories(3)); echo "</pre>"; /*$template->set_data('header','hello'); $template->set_alert('alert!'); $template->load('app/views/v_public_home.php', 'Welcome!');*/ ?> Thank you in advance.
    • Sounds like you set that field to be of the datatype INT, so when you try to insert a string datatype, you will get that error. Makes sense? Stef
  • Recent Status Updates

×
×
  • Create New...