Skip to content
weworknetwork

weworknetwork

  • About
  • About
  • Clients
  • Clients
  • Contact
weworknetwork
weworknetwork

Programming

Programming

  • Programming

    การแก้ปัญหาเบื้องต้นในการขึ้น Project แล้วติด Error

    Byitdhivii@gmail.com March 5, 2025May 14, 2025

    The error “SQLSTATE[HY000] [2002] Connection refused” means Laravel cannot connect to your MySQL database. Here’s how to fix it: 1. Check Your .env File Run: Verify the database settings: Save (CTRL+X, then Y, then Enter). 2. Test MySQL Connection Run: 3. Restart MySQL & Laravel Services Clear Laravel caches: 4. Check MySQL Status If MySQL…

    Read More การแก้ปัญหาเบื้องต้นในการขึ้น Project แล้วติด ErrorContinue

  • Programming

    การใช้งานฐานข้อมูลใน Laravel ผ่าน SQL (Raw Queries)

    Byitdhivii@gmail.com March 4, 2025

    Laravel รองรับการใช้ Raw SQL Queries ผ่าน DB::select(), DB::insert(), DB::update(), DB::delete(), และ DB::statement(). 📌 อย่าลืม import use Illuminate\Support\Facades\DB; ก่อนใช้งาน 1️⃣ SELECT – คำสั่งดึงข้อมูล 📌 ดึงข้อมูลทั้งหมด (SELECT * FROM users) 🔹 ผลลัพธ์เหมือน DB::table(‘users’)->get(); 📌 ดึงข้อมูลแบบมีเงื่อนไข (WHERE id = ?) 💡 ใช้ ? เพื่อป้องกัน SQL Injection 2️⃣ INSERT – เพิ่มข้อมูล 📌 เพิ่มข้อมูลใหม่ (INSERT INTO users (name, email) VALUES…

    Read More การใช้งานฐานข้อมูลใน Laravel ผ่าน SQL (Raw Queries)Continue

  • Programming

    การใช้งานฐานข้อมูลใน Laravel ผ่าน Eloquent ORM

    Byitdhivii@gmail.com March 4, 2025

    Eloquent เป็น ORM (Object-Relational Mapping) ที่ช่วยให้เราสามารถทำงานกับฐานข้อมูลได้ง่ายขึ้นโดยใช้ Model แทน SQL Query 📌 ก่อนใช้งานให้แน่ใจว่ามี Modelโดยปกติ Laravel จะมี Model User (app/Models/User.php) มาให้แล้วถ้าต้องการสร้าง Model ใหม่ใช้คำสั่ง 1️⃣ SELECT – ดึงข้อมูล 📌 ดึงข้อมูลทั้งหมด (SELECT * FROM users) 🔹 all() คืนค่าทุกแถวเหมือน SELECT * FROM users; 📌 ดึงข้อมูลแค่บางคอลัมน์ (SELECT name, email FROM users) 📌 ดึงข้อมูลแบบมีเงื่อนไข (WHERE id = 1) 🔹 ใช้ first() ดึงแค่…

    Read More การใช้งานฐานข้อมูลใน Laravel ผ่าน Eloquent ORMContinue

  • Programming

    FetchTableDataServlet Rest API

    Byitdhivii@gmail.com November 25, 2024

    To use the FetchTableDataServlet follow these steps: 1. Set up your project and servlet environment 2. Deploy the servlet 3. Testing the Servlet You can test the FetchTableDataServlet by sending HTTP requests (GET, POST, PUT, DELETE) to it. Here’s how you can use the servlet with examples of different HTTP methods. 4. Example of how…

    Read More FetchTableDataServlet Rest APIContinue

  • Programming

    JavaScript libraries use to display images from a REST API

    Byitdhivii@gmail.com November 21, 2024November 21, 2024

    Here are some great JavaScript libraries you can use to display images from a REST API in a grid with pagination: 1. Masonry.js Key Features: 2. PhotoSwipe Key Features: 3. React Virtualized Key Features: Use case: Works best in React-based projects. 4. Grid.js Key Features: 5. LightGallery Key Features: 6. Vue.js with Vuetify Data Grid…

    Read More JavaScript libraries use to display images from a REST APIContinue

  • Programming

    The performance difference between using a single PHP CRUD file and using multiple PHP file

    Byitdhivii@gmail.com November 21, 2024November 21, 2024

    The performance difference between using a single PHP CRUD file for all tables (action-based approach) and using multiple PHP files, each dedicated to a specific table, primarily depends on scalability, maintainability, and database interactions. Let’s break it down: 1. Single PHP CRUD File (Action-Based Approach) How It Works Performance Characteristics 2. Multiple PHP Files (1:1…

    Read More The performance difference between using a single PHP CRUD file and using multiple PHP fileContinue

Page navigation

1 2 Next PageNext

© 2025 weworknetwork - WordPress Theme by Kadence WP

  • About
  • About
  • Clients
  • Clients
  • Contact