tarek Posted February 19, 2010 Share Posted February 19, 2010 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; ?> Link to comment https://forums.phpfreaks.com/topic/192661-why-does-asterisk-appear-after-the-mysql-statement-in-php-script/ Share on other sites More sharing options...
sader Posted February 20, 2010 Share Posted February 20, 2010 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`));* Link to comment https://forums.phpfreaks.com/topic/192661-why-does-asterisk-appear-after-the-mysql-statement-in-php-script/#findComment-1015073 Share on other sites More sharing options...
roopurt18 Posted February 20, 2010 Share Posted February 20, 2010 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 ); Link to comment https://forums.phpfreaks.com/topic/192661-why-does-asterisk-appear-after-the-mysql-statement-in-php-script/#findComment-1015077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.