check_student_ids.php 441 B

123456789101112
  1. <?php
  2. require __DIR__ . '/bootstrap/app.php';
  3. $app = require_once __DIR__ . '/bootstrap/app.php';
  4. $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
  5. $studentIds = DB::connection('mysql')->table('students')->limit(5)->get(['student_id', 'name']);
  6. echo "学生ID类型检查:\n";
  7. foreach ($studentIds as $student) {
  8. echo "ID: {$student->student_id}, Type: " . gettype($student->student_id) . ", Name: {$student->name}\n";
  9. }