Jump to content


Photo

does this table exist?


  • Please log in to reply
2 replies to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 10 May 2006 - 07:28 PM

ran through the refman without much luck -- I just don't know what to search for. I found something in the PHP manual as a starting point "SQL SHOW TABLES" but I don't want to parse through a long list of table names -- just see if a very specific table name exists. Any ideas?

Thanks!

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 10 May 2006 - 07:40 PM

try
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--]SHOW TABLES LIKE 'table_name' [!--sql2--][/div][!--sql3--]

If table_name doesn't exist, it will return empty set.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 15 May 2006 - 01:35 PM

Thanks. got it working.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users