PHP - Mysql In Boolean Mode Error
why is this code not working? in php i have the following...
$keywords = "+hello +world"; $query= "SELECT * FROM forums WHERE MATCH (topics) AGAINST ('$keywords' IN BOOLEAN MODE)"; $results = mysqli_query($database, $query); $row = mysqli_fetch_assoc($results); $topics = $row['topics']; echo $topics; Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given... Similar Tutorialsfulltext in boolean mode is not matching ignored words in mysql.
ENGINE is set for myisam. mysql collation is utf8_general_ci.
i have altered table using...
ALTER TABLE users ADD FULLTEXT(userName);when i view mysql indexes, userName is username instead. I am not sure if this matter as there is not an error message when searching. SELECT * FROM users WHERE MATCH (userName) AGAINST ('$keywords' IN BOOLEAN MODE)I have restarted mysql and still does not match some 5 character words. in the mysql config, word length is set to 4. have i missed something? My my.cnf file has three sections (mysqld, mysqld_safe, mysql). It seems that they represent different modes which MySQL runs in. Is this correct? I read that some recommend running in safe mode. Should I be if it is being used to support PHP? I typically start MySQL as "service mysqld start" when running Centos. How should I be starting it if I want it in safe mode. why does the top code work and the bottom does not? what am i missing? the only real diffrence is the query. im getting "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in " for this code $numrows = mysql_num_rows($result). the query works fine in phpmyadmin. thanks $query = "SELECT * FROM dsgi_servlist " ; $result = mysql_query($query) ; $numrows = mysql_num_rows($result) ; echo $numrows ; $sql = "SELECT COUNT(*) FROM dsgi_servlist where location = 'hdd'"; $result = mysql_query($sql) ; $numrows = mysql_num_rows($result) ; echo $numrows ; Hi, I have an image uploader here and I am trying to have a user enter their password and check a box in order to submit their image. I am having trouble validating the password. I get this error message: "Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/content/68/6372768/html/submit.php on line 58" From this section of the code: $query = "SELECT * FROM user_info WHERE password = SHA($user_password)"; $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { $valid_password = true; } Anyone see what I am doing wrong? The password stored in my DB is encrypted with SHA. Code: [Select] <?php // Start the session require_once('startsession.php'); // Insert the page header $page_title = 'Submit an Image'; require_once('header.php'); require_once('appvars.php'); require_once('connectvars.php'); // Show the navigation menu require_once('navmenu.php'); // Make sure the user is logged in before going any further. if (!isset($_SESSION['user_id'])) { echo '<center><table border="0" cellspacing = "20"><tr><td>'; echo '<p class="login">Please <a href="login.php">log in</a> to access this page.</p>'; echo '</td></tr></table></center>'; // Insert the page footer echo '<div class="footer">'; require_once('footer.php'); echo '</div>'; exit(); } ?> <div class="linkrow"> <!-- end .linkrow --></div> <div class="contentBlue960"> <img src = "/IMAGES/WEBSITE/capBlue960.jpg"> <?php if (isset($_POST['submit'])) { // Connect to the DB $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Set password to false $valid_password = false; // Grab the id data from the POST $image_name = $_FILES['image_name']['name']; $image_name_type = $_FILES['image_name']['type']; $image_name_size = $_FILES['image_name']['size']; $user_password = (mysqli_real_escape_string($dbc, trim($_POST['user_password']))); $agree = mysqli_real_escape_string($dbc, trim($_POST['agree'])); // Grab the id data from the DB if (!isset($_GET['user_id'])) { $query = "SELECT user_name, password FROM user_info WHERE user_id = '" . $_SESSION['user_id'] . "'"; } else { $query = "SELECT user_name, password FROM user_info WHERE user_id = '" . $_GET['user_id'] . "'"; } $data = mysqli_query($dbc, $query); $user_name = $row['user_name']; $password = $row['password']; $query = "SELECT * FROM user_info WHERE password = SHA($user_password)"; $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { $valid_password = true; } // If image and password are entered if (!empty($user_password) && !empty($image_name)) { // If the entered password matches the user's password if ($valid_password == true) { // If the copyright is agreed to if (($agree) == ('checked')) { // If the pic is valid if ((($image_name_type == 'image/gif') || ($image_name_type == 'image/jpeg') || ($image_name_type == 'image/pjpeg') || ($image_name_type == 'image/png')) && ($image_name_size > 0) && ($image_name_size <= GW_MAXFILESIZE)) { if ($_FILES['image_name']['error'] == 0) { // Move the file to the target upload folder $target = GW_UPLOADPATH . $image_name; if (move_uploaded_file($_FILES['image_name']['tmp_name'], $target)) { // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die('Error connecting to MySQL server.'); // Write the data to the database $query = "INSERT INTO user_images VALUES (0, '$user_name', NOW(), '$image_name')"; mysqli_query($dbc, $query); // Confirm success with the user echo '<p>Thanks for submitting an image! Under review as soon as possible.</p>'; echo '<p><strong>User Name:</strong> ' . $user_name . '<br />'; echo '<img src="' . GW_UPLOADPATH . $image_name . '" alt="Submitted Image" /></p>'; echo '<p><a href="submit.php"><< Back to submit page.</a></p>'; // Clear the id data to clear the form $user_name = ""; $image_name = ""; mysqli_close($dbc); } else { echo '<p class="error">Sorry, there was a problem uploading your screen shot image.</p>'; } } } else { echo '<p class="error">The screen shot must be a GIF, JPEG, or PNG image file no greater than ' . (GW_MAXFILESIZE / 1024) . ' KB in size.</p>'; } // Try to delete the temporary screen shot image file @unlink($_FILES['image_name']['tmp_name']); } else { echo '<p class="error">Must agree with and check copyright box.</p>'; } } else { echo '<p class="error">Password Incorrect</p>'; } } else { // echo 'Pass' . $password . ' 1'; // echo 'User pass' . $user_password . ' 2'; // echo 'Checkbox' . $agree . ' 3'; // echo 'Username' . $user_name . ' 3'; echo '<p class="error">Please enter all of the information to add your image.</p>'; } } // mysqli_close($dbc); ?> <table border="1" cellspacing = "20"> <tr><td width = 960px><h2>Submit an Image</h2></td></tr> </table> <table border="1" cellspacing = "20"> <form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <tr><td width = "300"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo GW_MAXFILESIZE; ?>" /> <label for="image_name">Image:</label></td> <td><input type="file" id="image_name" name="image_name" /> </td></tr> <tr><td width = "300"> <label for="user_password">Enter Password:</label></td> <td><input type="text" id="user_password" name="user_password" /><br /> </td></tr> <tr><td width = "300"> <label for="terms">This image is my own work and I own all copyrights to it.</label></td> <td><input type="checkbox" id="agree" name="agree" value = "checked"/><br /> </td></tr> <tr><td width = "300"> <input type="submit" value="Submit Image" name="submit" /> </td></tr> </form> </td> </tr> </table> <img src = "/IMAGES/WEBSITE/bottomBlue960.jpg"> <!-- end .contentWhite960 --></div> <div class="footer"> <?php // Insert the page footer require_once('footer.php'); ?> <!-- end .footer --></div> Thanks if you can help, Craig I created this function to update my tour system. The query is working and is updating one row in the table, but I get a resource boolean error in the return section of the function. Any idea why? Code: [Select] function update_tour($uid, $step) { $step = (int)$step; $uid = (int)$uid; $sql = "UPDATE `users` SET `tour_step` = ${step} WHERE `id` = '${uid}'"; $q = mysql_query($sql) or die(mysql_error()); return (mysql_num_rows($q) === 1) ? mysql_result($q, 0): false; } Hello there, I'm having a issue where when I run the following statement: $Session = $Module['MySQL']->RowCount("SELECT * FROM xhost_accounts WHERE (account_username = '{$Module['MySQL']->Escape($AccountUsername)}' OR account_email = '{$Module['MySQL']->Escape($AccountUsername)}') AND account_password = MD5('{$AccountPassword}')") == 1 ? true:false; I am proceeded by the following error: Code: [Select] Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\Backend\MySQL-Module.php on line 49 Yet when I do the following statement: echo $Module['MySQL']->RowCount("SELECT * FROM xhost_accounts WHERE (account_username = '{$Module['MySQL']->Escape($AccountUsername)}' OR account_email = '{$Module['MySQL']->Escape($AccountUsername)}') AND account_password = MD5('{$AccountPassword}')") It gives me the output of 2 (That's the correct table row count)? Does anybody have any insight into why this could be happening thanks. Hey, I found some code online that references a bunch of sql commands in there own functions that can be called from a require_once(), All the ones I have tried work expect mysql_query when its called it returns this error: Quote Warning: mysql_result() expects parameter 1 to be resource, boolean given in But once i paste the mysql_query into the main script it works fines. code below is mine and the online script. Webcode: Code: [Select] $sql = "SELECT cat_id, cat_parent_id, cat_name, cat_description, cat_image FROM tbl_category WHERE cat_parent_id = $catId ORDER BY cat_name"; /* Don't know what getPagingQuery does and couldnt find any reference to it so i removed it and replaced with simple query in my own code */ $result = dbQuery(getPagingQuery($sql, $rowsPerPage)); My Code: Code: [Select] $sql = "SELECT cat_id, cat_parent_id, cat_name, cat_description, cat_image FROM tbl_category WHERE cat_parent_id = $catId ORDER BY cat_name"; $result = dbQuery($sql); Include file: Code: [Select] $dbHost = "localhost"; //SQL Server $dbUser = "root"; // Database username $dbPass = ""; // Database password $dbName = "lh_shop"; // Database name $sqlCon = mysql_connect($dbHost, $dbUser, $dbPass) or die ('MYSQL connection Failed. ' . mysql_error()); mysql_select_db($dbName) or die('Cannot select database. ' . mysql_error()); // Database query functions function dbQuery($sql) { return mysql_query($sql) or die('Query failed. ' . mysql_error()); } Thanks, I really hope someone has had this issue This is a new error for me. I tried looking through some older posts and so far nothing had fixed it and thus I am stumped. Any idea what could be throwing this error? Code: [Select] <table> <?php //open DB connection include 'dbconn.php'; $sql = "select * tbl_test"; $result = mysql_query($sql,$conn); print $sql; while ($row = mysql_fetch_array($result)){ $status = $row['status']; $space = $row['spacename']; if ($status=="reserved") { echo <<<END <tr> <td style="background-color:#F00; color:#FFF;" align="center">Reserved</td> </tr> END; } else { echo <<<END <tr> <td align="center">$space</td> </tr> END; } } ?> </table> 2 9 0 1 Fatal error: Call to a member function bind_param() on boolean.
It fails on the BIND_PARAM line.
I have looked at this all day, struggling with Mysqli as my normal MySql works fine with assoc and fetch.
I have verified in PhpInfo that mysqli is enabled. I have verified its loaded using <?php print_r(get_loaded_extensions()); Added utf8 just to make sure.
If I manually use the Wrong Password, I get a connection refused error, so I know its connected.
Verified my $_POST variables are there using Print in the 2 9 0 1 above.
All Table and Field Names are correct. Manual Insert works fine in myPhpAdmin. Tried Field Names and ? marks with and without single quotes. All fields are Integers in the table.
Could it be related to an Auto_Increment Field in the table for a record ID that I am not providing?? A normal insert in myPhpAdmin doesn't need it.
$QuestionID = $_POST['qID']; print $QuestionID . " ";
Thanks, CadJoe Edited August 26, 2017 by CadJoeI have been pulling my hair out for the lasy 3 hours i am trying to update a MySql table but i cant get it too work, i just keep getting MySql error #1064 - You have an error in your SQL syntax; if i just update 1 field it works fine but if i try to update more than 1 field it dosent work, Help Please! <?php $root = $_SERVER['DOCUMENT_ROOT']; require("$root/include/mysqldb.php"); require("$root/include/incpost.php"); $con = mysql_connect("$dbhost","$dbuser","$dbpass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("$dbame", $con); mysql_query("UPDATE Reg_Profile_p SET build='$build' col='$col' size='$size' WHERE uin = '$uinco'"); ?> does anyone know who to resolve this issue of importing a CSV file from excel into sql? I get this error when I do. LOAD DATA LOCAL INFILE '/tmp/phpq2aAbU' INTO TABLE `Events` FIELDS TERMINATED BY ',' ENCLOSED BY '\\"' ESCAPED BY '\\\\' LINES TERMINATED BY '\r\n' I'm not a programmer, so sometimes the php.net/manual reads like a foreign language to me. I have a quick interpretation question: I'm generating data in PHP for a MySQL stored procedure that has two comma separated value inputs. The second input is always a series of 0's and 1's. I'm trying to count the number of 1's for the second input (in the example below, it would be "3"). Example input sent to MySQL:$query_resolve = "CALL spParticipant_Test ('188,216,342,81,117,56','0,1,1,0,0,1')"; http://www.php.net/manual/en/function.count-chars.php is mostly helpful, but I am hoping for clarification on the mode I want to run. Quote Depending on mode count_chars() returns one of the following: 0 - an array with the byte-value as key and the frequency of every byte as value. 1 - same as 0 but only byte-values with a frequency greater than zero are listed. 2 - same as 0 but only byte-values with a frequency equal to zero are listed. 3 - a string containing all unique characters is returned. 4 - a string containing all not used characters is returned. Do I want to run mode "1"? Thanks so much for any feedback! <script> //Calculate Labour function filllabour(aa) { //Parse aa var the_string = aa; var parts = the_string.split('-', 2); // After calling split(), 'parts' is an array with two elements: // parts[0] is 'left or -' // parts[1] is 'right of -' var the_text = parts[0]; var the_num = parts[1]; //Parse aa var dblQuantity = document.getElementById('lqlabour-' + the_num).value-0; var curRate = document.getElementById("llabour-" + the_num).value-0; var curRateHelper = document.getElementById("lhelper-" + the_num).value-0; var dblMarkup = document.getElementById("lmarkup-" + the_num).value-0; var curTotal = parseFloat(dblMarkup) / 100.0; llinetotal = ((dblQuantity * curRate) + (dblQuantity * curRateHelper)) * (1 + curTotal); llinetotal = llinetotal.toFixed(2); document.getElementById("ltotal-" + the_num).value = llinetotal; //document.getElementById(the_num).value = ("test"); //alert(the_num); //collect all line totals var inputs = document.getElementsByName("ltotal[]"); var laboursubtotal = 0; for (var i = 0.00; i < inputs.length; i++){ if (inputs[i].type = "text"){ laboursubtotal += parseFloat(inputs[i].value, 10); } } //collect all line totals laboursubtotal = laboursubtotal.toFixed(2); document.getElementById("labourtotal").value = laboursubtotal; filltotal(); } //Calculate Labour </script>hi, in ie11 we are forced to use compatibility mode for one of our web applications written in php. above is a script that from what I understand is the error is with getElementsByName. any suggestions for me in ie11? Hello,
How can I create a webpage using HTML and have a div wrapper for the page become FULL SCREEN?
I'm guessing this would be done with Javascript.
Hi I am trying to figure out with this example i saw online does not work...I am building a database to store user and password and i keep getting an error "undefined index username" i need it to pull the username from mysql database so how do i do this??? mysql_connect("host", "username", "pw") or die (mysql_error()); mysql_select_db('username') or die (mysql_error()); if(mysql_num_rows(mysql_query("SELECT * from users WHERE username='" . $_POST['username'] . "'")) == 1) ( this is the error line) now I have the actual host username and pw in my file i just took it off for my security lol. Hello, can anybody tell me whats wrong with my code: function check_login($uname, $pwd){ $sql = "SELECT * FROM users WHERE uname=$uname"; $result = mysql_query($sql) or die('Error, Load query failed: ' . mysql_error()); $data = array(); while($row=mysql_fetch_assoc($result)){ $data[] = $row; } return $data; } $chk = check_login("test", "test1"); foreach($chk as $row){ echo $row['uname']; echo " = "; echo $row['pass']; echo "<BR>"; } when i run this i get: Quote Error, Load query failed: Unknown column 'test' in 'where clause' My code: Code: [Select] $extract = mysql_query("SELECT id,title,message FROM blog ORDER BY id DESC LIMIT 1"); while ($row = mysql_fetch_assoc($extract)) { echo "<div class='right'><h2>".$row['title']."</h2><div class='articles'>".nl2br(stripslashes($row['message']))."</div></div>"; } Error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/stonedms/public_html/justin/Toplist/index.php on line 29 I've double checked my database, and it seems like I've have everything correct. I have a newUser function in a class (database) that attempts to input all the post data from a registration (after it validates it all of course). Here is my function: Code: [Select] public function newUser($properties, $validated, $userLevel, $validationCode) { $qualityControl = new QualityControl; $properties = $this->escapeString($_POST); $properties['password'] = $qualityControl->encryptData($properties['password']); $time = gmmktime(); $query = "INSERT INTO 'TABLE_NAME' (handle, email, userLevel, password, banned, dateJoined, validated, validtionCode) VALUES ('$properties[username]','$properties[email]','$userLevel','$properties[password]',0,'$time','$validated','$validationCode')"; return mysql_query($query, $this->connection); } I am getting an error in that my query is not inserting, no errors come up with mysql_error if I toss that in after the query and this function appears to run fine as it returns and the rest of the script is run. I have a feeling it has to do with either my sql syntax or the escapeString function. Escape string is a function that is "supposed" to escape a string passed to it or iterate through an entire array it is passed, here is the code for it: Code: [Select] private function escapeString($data) { if (is_array($data)) { foreach ($data as &$value) $value = mysql_real_escape_string($value); return $data; } return mysql_real_escape_string($data); } If there error isn't in either of these two areas, it might be the encryptData function? All it is doing is md5ing + salting the password and returning the result. Here is that function if you need it: Code: [Select] return md5(SALT.$data); Very simple, I don't think the error is there. The globals I'm using are all defined correctly so that shouldn't be a problem either. I've been looking at it for the past hour and can't figure out why my stuff won't get into the database. Oh, here's the beginning of the database class that opens the database and such, I'm not getting any errors from it. Code: [Select] class Database { var $connection; public function __construct() { $qualityControl = new QualityControl; $this->connection = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD) or die(mysql_error()); mysql_select_db(DB_NAME, $this->connection) or die(mysql_error()); } Thank you for any help! Also, please excuse some of the sloppiness like the error handling not being graceful, etc, I usually pretty that stuff up after I'm done with the script. -Adam You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Number LIKE '%TEST%' OR Name LIKE '%TEST%'' at line 1 Is the error message i get... Here is my code... <?php $search=$_POST['searchform']; if(!$search) die('Please enter a search'); //connect to the database $db=mysql_connect ("xxxxxx", "xxxx", "xxxx") or die ('I cannot connect to the database because: ' . mysql_error()); //-select the database to use $mydb=mysql_select_db("wadkin"); //-query the database table $sql="SELECT ID, Stock Number, Name FROM Contacts WHERE Stock Number LIKE '%" . $search . "%' OR Name LIKE '%" . $search ."%'"; //-run the query against the mysql query function $result=mysql_query($sql) or die (mysql_error()); //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $Stock =$row['Stock Number']; $Name=$row['Name']; $ID=$row['ID']; //-display the result of the array echo "<ul>\n"; echo "<li>" . "<a href=\"search.php?id=$ID\">" .$Stock . " " . $Name . "</a></li>\n"; echo "</ul>"; } ?> Can someone correct for me please????!!!!! Hi guys, I'm having a really frustrating problem with some PHP and MySQL. I've tested the MySQL in PHPMyAdmin and it runs fine, which is why I've posted this in PHP problems. All I want to do is copy one table to another (dropping the other first) as a backup, then recreate the original table but blank. I've tried running the functions in PHPMyAdmin, which works. Then I used its "Create PHP Code" function to make the PHP, which I edited to remove line breaks etc. Even if I used the unedited PHP made by PHPMyAdmin, it still doesn't work! The error is always a syntax one: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE mobackup (campaign_id varchar(20) NOT NULL, number varchar(13) NOT ' at line 1" Here's the code: Code: [Select] <?php $connection = mysql_connect(connection details hidden for security purposes, but they definitely work); mysql_select_db("betfredpiri", $connection); $sql = "DROP TABLE IF EXISTS mobackup; CREATE TABLE mobackup (campaign_id varchar(20) NOT NULL, number varchar(13) NOT NULL, message varchar(160) NOT NULL, mo_id int(15) NOT NULL, shortcode int(7) NOT NULL, received_time varchar(20) NOT NULL, network varchar(15) NOT NULL, retry tinyint(1) NOT NULL, FULLTEXT KEY message (message)) ENGINE = MyISAM DEFAULT CHARSET = latin1; INSERT INTO mobackup SELECT * FROM mo; DROP TABLE IF EXISTS mo; CREATE TABLE mo (campaign_id varchar(20) NOT NULL, number varchar(13) NOT NULL, message varchar(160) NOT NULL, mo_id int(15) NOT NULL, shortcode int(7) NOT NULL, received_time varchar(20) NOT NULL, network varchar(15) NOT NULL, retry tinyint(1) NOT NULL, FULLTEXT KEY message (message)) ENGINE = MyISAM DEFAULT CHARSET = latin1;"; mysql_query(mysql_real_escape_string($sql)); ?> I've also tried it with the following statements: Code: [Select] <?php $sql2 = "DROP TABLE IF EXISTS mobackup;" ."CREATE TABLE mobackup (campaign_id varchar(20) NOT NULL, " ."number varchar(13) NOT NULL, " ."message varchar(160) NOT NULL, " ."mo_id int( 15 ) NOT NULL, " ."shortcode int(7) NOT NULL, " ."received_time varchar(20) NOT NULL, " ."network varchar(15) NOT NULL, " ."retry tinyint(1) NOT NULL, " ."FULLTEXT KEY message (message) ) ENGINE = MyISAM DEFAULT CHARSET = latin1;" ."INSERT INTO mobackup SELECT * FROM mo;" ."DROP TABLE IF EXISTS mo;" ."CREATE TABLE mo (campaign_id varchar(20) NOT NULL, " ."number varchar(13) NOT NULL, " ."message varchar(160) NOT NULL, " ."mo_id int(15) NOT NULL, " ."shortcode int(7) NOT NULL, " ."received_time varchar(20) NOT NULL, " ."network varchar(15) NOT NULL, " ."retry tinyint(1) NOT NULL, " ."FULLTEXT KEY message (message)) ENGINE = MyISAM DEFAULT CHARSET = latin1;"; ?>and Code: [Select] <?php $sql3 = "\n" . "DROP TABLE IF EXISTS `betfredpiri`.`mobackup`;\n" . " CREATE TABLE `betfredpiri`.`mobackup` ( `campaign_id` varchar( 20 ) NOT NULL ,\n" . " `number` varchar( 13 ) NOT NULL ,\n" . " `message` varchar( 160 ) NOT NULL ,\n" . " `mo_id` int( 15 ) NOT NULL ,\n" . " `shortcode` int( 7 ) NOT NULL ,\n" . " `received_time` varchar( 20 ) NOT NULL ,\n" . " `network` varchar( 15 ) NOT NULL ,\n" . " `retry` tinyint( 1 ) NOT NULL ,\n" . " FULLTEXT KEY `message` ( `message` ) ) ENGINE = MyISAM DEFAULT CHARSET = latin1;\n" . "\n" . "INSERT INTO `betfredpiri`.`mobackup` SELECT * FROM `betfredpiri`.`mo`;" . "DROP TABLE IF EXISTS `betfredpiri`.`mo`;\n" . " CREATE TABLE `betfredpiri`.`mo` ( `campaign_id` varchar( 20 ) NOT NULL ,\n" . " `number` varchar( 13 ) NOT NULL ,\n" . " `message` varchar( 160 ) NOT NULL ,\n" . " `mo_id` int( 15 ) NOT NULL ,\n" . " `shortcode` int( 7 ) NOT NULL ,\n" . " `received_time` varchar( 20 ) NOT NULL ,\n" . " `network` varchar( 15 ) NOT NULL ,\n" . " `retry` tinyint( 1 ) NOT NULL ,\n" . " FULLTEXT KEY `message` ( `message` ) ) ENGINE = MyISAM DEFAULT CHARSET = latin1;\n"; ?> Both adaptations of PHPMyAdmin's export to a PHP statement. Any ideas would be most welcome! I'm tearing my hair out over this. Jamie |