Jump to content

Why does asterisk appear after the MySQL statement in PHP script???


tarek

Recommended Posts

This was taken from a working model. Inside the heredoc (<<<) an asterisk appears at the end of each MySQL statement after the semicolon (lines 3 and 9). The actual working script contains several statements and it appears after each one, so it's unlikely it was unintentional. Does anyone know its function or purpose?

 

<?php
$sql_file=<<<SQL_FILE
DROP TABLE IF EXISTS `table_name`;*
CREATE TABLE IF NOT EXISTS `table_name` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(250) default NULL,
  `address` varchar(250) default NULL,
  PRIMARY KEY  (`id`)
);*
SQL_FILE;
?>

u are blind or what?

CREATE TABLE IF NOT EXISTS `table_name` (  `id` int(11) NOT NULL auto_increment,  `name` varchar(250) default NULL,  `address` varchar(250) default NULL,  PRIMARY KEY  (`id`));*

How does your response answer the OP's inquiry?

 

Does the code contain anything like:

$some_var = explode( '*', $sql_file );

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.