Jump to content

[SOLVED] MySQL/PHP query issue.


iPixel

Recommended Posts

Ok i've got a table with a field called "terminated".

0 = employed, 1 = byebye

 

Here's the query

<?php
$emp_list_query = "SELECT firstname, lastname FROM table_ad WHERE manager = '$wholename' AND terminated = '0' ORDER BY firstname ASC LIMIT 0, 11";
?>

 

This causes a syntax error near 'terminated. My assumption is because of the work which is probably a predefined MySQL function or something.

 

I've tried placing the fieldname 'terminated' into single quotes but that just doesnt return anything at all. No error, but no data either.

 

 

What's the deal here?

Link to comment
https://forums.phpfreaks.com/topic/179243-solved-mysqlphp-query-issue/
Share on other sites

let me get this straight. when you put WHERE teminated=0 it retrieves the rows that have terminated with a value of 1. that doesn't make any sense. are you sure the fields in your database are how you expect them to me

 

EDIT: ok i was about to say

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.