0

I have the following query:

$query = $this->db->query("SELECT * FROM so.KI WHERE ICCID IN ('$nabi') ") or die(mysql_error());

But I get the following error:

A Database Error Occurred

Error Number:

SELECT * FROM so.KI WHERE ICCID in 8993017100107912997,8993017100107913011,8993017100107913029,8993017100107913037,8993017100107913045

They so database is Oracle and the KI table has got 2700000 records.

any help is highly appreciated! I wonder why such error is showed up!

M Reza Saberi
  • 7,134
  • 9
  • 47
  • 76

2 Answers2

1

here 8993017100107912997,8993017100107913011,8993017100107913029,8993017100107913037,8993017100107913045 is diffrent ids so as per you had defin

"SELECT * FROM so.KI WHERE ICCID IN ('$nabi') " its contain all string in condition.

please try below. and also check DATAbase connection also.

"SELECT * FROM so.KI WHERE ICCID IN ($nabi) "

Darshan Santoki
  • 121
  • 2
  • 9
1

when using in('$variable') it prints as ('a,b.c.d') while it should be in('a','b','c','d') you have to put quotation for each element inside in() clause