Jump to content

janniesekind

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

janniesekind's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Let me rephrase I'm trying for the last 2 days, with 2 hours sleep, and viewing hundreds of forums, to achieve this : XMl data <postid>1</postid> <posttitle>post title 1</posttitle> <date>2012-01-01</date> <postmeta> <meta_key>Banner1URLforpost1</meta_key> <meta_value>http://banner1forpost1.com</meta_value> </postmeta> <postmeta> <meta_key>Banner2URLforpost1</meta_key> <meta_value>http://banner2forpost1.com</meta_value> </postmeta> <postmeta> <meta_key>Banner3URLforpost1</meta_key> <meta_value>http://banner3forpost1.com</meta_value> </postmeta> <postid>1</postid> <posttitle>post title 2</posttitle> <date>2012-01-01</date> <postmeta> <meta_key>Banner1URLforpost22/meta_key> <meta_value>http://banner1forpost2.com</meta_value> </postmeta> <postmeta> <meta_key>Banner2URLforpost2</meta_key> <meta_value>http://banner2forpost2.com</meta_value> </postmeta> <postmeta> <meta_key>Banner3URLforpost2</meta_key> <meta_value>http://banner3forpost2.com</meta_value> </postmeta> <postid>1</postid> <posttitle>post title 3</posttitle> <date>2012-01-01</date> <postmeta> <meta_key>Banner1URLforpost3</meta_key> <meta_value>http://banner1forpost3.com</meta_value> </postmeta> <postmeta> <meta_key>Banner2URLforpost3</meta_key> <meta_value>http://banner1forpost3.com</meta_value> </postmeta> <postmeta> <meta_key>Banner3URLforpost3</meta_key> <meta_value>http://banner1forpost3.com</meta_value> </postmeta> Now, my PHP looks something like this : <?php // displays all the file nodes if(!$xml=simplexml_load_file('xml.xml')){ trigger_error('Error reading XML file',E_USER_ERROR); } echo 'Displaying contents of XML file...<br />'; foreach($xml as $item){ echo 'postid: '.$item->postid.'<br>'; echo 'posttitle: '.$item->posttitle.'<br>'; echo 'date: '.$item->date.'<br>'; echo '<br><br>'; } ?> So, the output is : postid: 1 posttitle: post title 1 date:2012-01-01 postid: 2 posttitle: post title 2 date:2012-01-01 postid: 3 posttitle: post title 1 date:2012-01-01 Once I add a foreach loop within the foreachloop, it shows me the metakey and meta_value of all the items. So It looks like this : postid: 1 posttitle: post title 1 date:2012-01-01 metakey: Banner1URLforpost1 metavalue:http://banner1forpost1.com metakey: Banner2URLforpost1 metavalue:http://banner2forpost1.com metakey: Banner3URLforpost1 metavalue:http://banner3forpost1.com metakey: Banner1URLforpost2 metavalue:http://banner1forpost2.com metakey: Banner2URLforpost2 metavalue:http://banner2forpost2.com metakey: Banner3URLforpost2 metavalue:http://banner3forpost2.com metakey: Banner1URLforpost3 metavalue:http://banner1forpost3.com metakey: Banner2URLforpost3 metavalue:http://banner2forpost3.com metakey: Banner3URLforpost3 metavalue:http://banner3forpost3.com postid: 2 posttitle: post title 2 date:2012-01-01 metakey: Banner1URLforpost1 metavalue:http://banner1forpost1.com metakey: Banner2URLforpost1 metavalue:http://banner2forpost1.com metakey: Banner3URLforpost1 metavalue:http://banner3forpost1.com metakey: Banner1URLforpost2 metavalue:http://banner1forpost2.com metakey: Banner2URLforpost2 metavalue:http://banner2forpost2.com metakey: Banner3URLforpost2 metavalue:http://banner3forpost2.com metakey: Banner1URLforpost3 metavalue:http://banner1forpost3.com metakey: Banner2URLforpost3 metavalue:http://banner2forpost3.com metakey: Banner3URLforpost3 metavalue:http://banner3forpost3.com postid: 3 posttitle: post title 1 date:2012-01-01 metakey: Banner1URLforpost1 metavalue:http://banner1forpost1.com metakey: Banner2URLforpost1 metavalue:http://banner2forpost1.com metakey: Banner3URLforpost1 metavalue:http://banner3forpost1.com metakey: Banner1URLforpost2 metavalue:http://banner1forpost2.com metakey: Banner2URLforpost2 metavalue:http://banner2forpost2.com metakey: Banner3URLforpost2 metavalue:http://banner3forpost2.com metakey: Banner1URLforpost3 metavalue:http://banner1forpost3.com metakey: Banner2URLforpost3 metavalue:http://banner2forpost3.com metakey: Banner3URLforpost3 metavalue:http://banner3forpost3.com So, it shows me the postmeta for ALL the item instances. But what I need is : postid: 1 posttitle: post title 1 date:2012-01-01 metakey: Banner1URLforpost1 metavalue:http://banner1forpost1.com metakey: Banner2URLforpost1 metavalue:http://banner2forpost1.com metakey: Banner3URLforpost1 metavalue:http://banner3forpost1.com postid: 2 posttitle: post title 2 date:2012-01-01 metakey: Banner1URLforpost2 metavalue:http://banner1forpost2.com metakey: Banner2URLforpost2 metavalue:http://banner2forpost2.com metakey: Banner3URLforpost2 metavalue:http://banner3forpost2.com postid: 3 posttitle: post title 1 date:2012-01-01 metakey: Banner1URLforpost3 metavalue:http://banner1forpost3.com metakey: Banner2URLforpost3 metavalue:http://banner2forpost3.com metakey: Banner3URLforpost3 metavalue:http://banner3forpost3.com
  2. I am about to cry. I have this <title>title of post</title> <link>http-linktopost</link> <pubDate>Mon, 14 Mar 2011 18:34:49 +0000</pubDate> <creator>Cheng2011</creator> <postmeta> <meta_key>uniqueID1</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID2</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID3</meta_key> <meta_value>value for meta key</meta_value> </postmeta> So, here's the PHP <?php // displays all the file nodes if(!$xml=simplexml_load_file('xml.xml')){ trigger_error('Error reading XML file',E_USER_ERROR); } echo 'Displaying contents of XML file...<br />'; foreach($xml as $item){ echo 'Title: '.$item->title.'<br>'; echo 'Link: '.$item->link.'<br>'; echo 'pubDate: '.$item->pubDate.'<br>'; echo 'creator: '.$item->postmeta->meta_key->??????????????.'<br>'; echo '<br><br>'; } ?> So I get what I want, I get the title, link, pub date. But how can I get the value for : uniqueID3 In MySQL I would say something like, WHERE meta_key=uniqueID3 My problem is, I have multiple instances <title>title of post</title> <link>http-linktopost</link> <pubDate>Mon, 14 Mar 2011 18:34:49 +0000</pubDate> <creator>Cheng2011</creator> <postmeta> <meta_key>uniqueID1</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID2</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID3</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <title>title of post</title> <link>http-linktopost</link> <pubDate>Mon, 14 Mar 2011 18:34:49 +0000</pubDate> <creator>Cheng2011</creator> <postmeta> <meta_key>uniqueID1</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID2</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID3</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <title>title of post</title> <link>http-linktopost</link> <pubDate>Mon, 14 Mar 2011 18:34:49 +0000</pubDate> <creator>Cheng2011</creator> <postmeta> <meta_key>uniqueID1</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID2</meta_key> <meta_value>value for meta key</meta_value> </postmeta> <postmeta> <meta_key>uniqueID3</meta_key> <meta_value>value for meta key</meta_value> </postmeta> But when I use the foreach function to get the postmeta data - I get the postmeta data at each instance, for ALL the posts. Please help
  3. I think the main issue is getting that data to a single variable. For example, $result = ??? array ??? echo $result; // Users who belong to group 555 as an example
  4. hey everyone will you please assist. I'm getting data from a mysql database. And I want to assign the data to a single value, if possible For example, in my database I have 2 columns, name and group Lets say John, Peter and Cathy belongs to group 555, where Sally and Marcus belongs to group 777. So my sql query outputs all users in group 555 Is there a way to assign the search result to a vlue, for example $result = ??? and If I said echo $result, it should show the users who belongs to group 555 as an example. I tried to use row[Name][1]; but it doesnt work. The thing is, I can display the data the way I am familiar with, but I'm sending an automated email to myself, containing the users. So if I would used a for each statement, the mail will trigger and send a copy for every count, in this case, 3 times. And thats my huge problem. The mail must trigger only once, containing the users in my search query, in this case, group 555. Any help will be appreciated Thank you
  5. hey man thank you so so so so so much. Its working now. its 95% of what I wanted. But its working just fine. Thank you again. I cannot express how drained I felt because of frustration and no sleep. Thanx again. You are the first one to assist me in 5 hard days. thumbs up for you
  6. Hey everyone. I am totally numb. I've posted this on daniweb.com but I suppose no one is able to help em with this. Maybe it is impossible. I dont care how I achieve this, via css, or tables, as long as I get it. I have a small classifieds site for a local church. Categories and sub categories are created from the admin section. So the page needs to be created dynamicly. The result is exactly what I want, except for the huge gaps. This is an html sample of what I have : (please bear with me, please) ########################################################################################### <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /></td> </tr> <tr> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link <br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> </tr> <tr> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link<br /> --> Sub title/link</td> <td width="30%" valign="top">Category Title<br /> --> Sub title/link<br /> --> Sub title/link</td> </tr> </table> ########################################################################################### this is what I want ########################################################################################### <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="30%" valign="top"> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link <br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link <br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link <br> --> Sub Title / Link</td> </tr> </table></p></td> <td width="30%" valign="top"><table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table></td> <td width="30%" valign="top"><table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td>Category Title</td> </tr> <tr> <td>--> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link<br> --> Sub Title / Link</td> </tr> </table></td> </tr> </table> ########################################################################################### and this is my php code to achieve what I currently have ########################################################################################### <?php if (!function_exists("GetSQLValueString")) { require_once ($FolderFunctions.'getvaluestring.php'); } mysql_select_db($database_classi, $classi); $query_docategories = "SELECT catID, Title, ParentCat, `Description`, `Sort` FROM category WHERE ParentCat = '0' ORDER BY Sort ASC"; $docategories = mysql_query($query_docategories, $classi) or die(mysql_error()); $row_docategories = mysql_fetch_assoc($docategories); $totalRows_docategories = mysql_num_rows($docategories); ?> <h1> <?php echo $lanClassifiedAds; ?> </h1> <div class="homelist"> <table border="0" width="100%"> <?php //set 3 to 4 of you want 4 columns. Set it to 5 if you want 5, etc $numcols = 4; // how many columns to display $numcolsprinted = 0; // no of columns so far // get the results to be displayed mysql_select_db($database_classi, $classi); $query = "SELECT * FROM category WHERE ParentCat = '0'"; $mysql_result = mysql_query($query, $classi); // get each row while($myrow = mysql_fetch_row($mysql_result)) { ?> <?php $in= $myrow[3].'<br>'; if ($numcolsprinted == $numcols) { print "</tr>\n<tr>\n"; $numcolsprinted = 0; } // output row from database echo "<td class='valigntop'><div class='homelistbottompad'><div class='homepagecategories'>$in</div>"; ?> <?php mysql_select_db($database_classi, $classi); $query_dosubcategories = "SELECT catID, Title, ParentCat, `Description`, `Sort` FROM category WHERE ParentCat = '".$myrow[0]."' ORDER BY Sort ASC"; $dosubcategories = mysql_query($query_dosubcategories, $classi) or die(mysql_error()); $row_dosubcategories = mysql_fetch_assoc($dosubcategories); $totalRows_dosubcategories = mysql_num_rows($dosubcategories); ?> <?php do { ?> <div class="subpagecategories">&#8226; <a href="<?php echo 'ads-List_'.$row_dosubcategories['catID']; ?>.html" class="list" title="<?php echo $row_dosubcategories['Title']; ?> | <?php echo $row_meta['SiteTitle']; ?> - <?php echo $row_meta['SiteSlogan']; ?>"><?php echo $row_dosubcategories['Title']; ?></a> <?php mysql_select_db($database_classi, $classi); $query_getcount = "SELECT itemID,CatID FROM item WHERE catID = '".$row_dosubcategories['catID']."' AND Status='Active'"; $getcount = mysql_query($query_getcount, $classi) or die(mysql_error()); $row_getcount = mysql_fetch_assoc($getcount); $totalRows_getcount = mysql_num_rows($getcount); echo '('.$totalRows_getcount.')'; ?></div> <?php } while ($row_dosubcategories = mysql_fetch_assoc($dosubcategories)); ?> <?php echo "</td>\n"; // bump up row counter $numcolsprinted++; } // end while loop $colstobalance = $numcols - $numcolsprinted; for ($i=1; $i<=$colstobalance; $i++) { } print "<TD></div></TD>\n"; ?> </table> </div> ########################################################################################### [attachment deleted by admin]
  7. I've been sitting in front of this pc reading hundreds of threads and posts, and simply not getting anywhere. I'm so into reading, and really tired, becasue its (again) 3 in the morning, that I have to look up or stand up to realise where I am. So if there is anyone who could assist, please do. Its an availability script... yes, it is. When searching for rooms - the script is working fine when rooms are available for the selected dates. But once a room is taken / not available, I get the "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in..../connect_db.php on line 38" error. So here is my code. I THINK THE ERROR LIES SOMEWHERE HERE - PLEASE SCROLL DOWN FOR THE FULL SCRIPT $start = "2009-05-01"; $end = "2009-05-02"; $sql = "SELECT DISTINCT room.RoomString "; $sql .= "FROM bookings INNER JOIN room ON bookings.RoomString = room.RoomString "; $sql .= "WHERE ((bookings.CheckOut > '" . $start . "' "; $sql .= "AND bookings.CheckOut <= '" . $end . "') "; $sql .= "OR (bookings.CheckIn < '" . $end . "' "; $sql .= "AND bookings.CheckIn >= '" . $start . "') "; $sql .= "OR (bookings.CheckIn <= '" . $start . "' "; $sql .= "AND bookings.CheckOut >= '" . $end . "'))"; $unavailable_objets = db_query($database_name, $sql); $unavailable_list = ""; while($unavailable_objets_ = fetch_array($unavailable_objets)) { $unavailable_list .= $unavailable_objets_["RoomString"] . ","; } if($unavailable_list != "") { $unavailable_list = substr($unavailable_list, 0, strlen($unavailable_list)-1); } //shorts last comma $sql = "SELECT DISTINCT * "; $sql .= "FROM room "; if($unavailable_list != "") { $sql .= "WHERE room.RoomString NOT IN ( " . $unavailable_list . " )"; } $sql .= ";"; Apart from that - here's all the pages. connect_db.php <?php ini_set ("display_errors", "1"); error_reporting(E_ALL); function db_query($db_name, $sql) { $sql = str_replace("# ", "", $sql); $sql = str_replace("#' ", "", $sql); global $db_connection_type, $db_server_address, $db_user, $db_password; switch($db_connection_type) { case "odbc": $db_connection = odbc_connect($db_name, $db_user, $db_password); $result = odbc_exec($db_connection, $sql); break; case "mysql": $db_connection = mysql_connect($db_server_address, $db_user, $db_password); $result = mysql_db_query($db_name, $sql, $db_connection); } return $result; } function fetch_array($array) { global $db_connection_type; switch($db_connection_type) { case "odbc": $result = odbc_fetch_array($array); break; case "mysql": $result = mysql_fetch_array($array); } return $result; } ?> config.php <?php $app_path = "http://localhost/avail/"; $db_server_address = "localhost"; $database_name = "room"; $db_user = "root"; $db_password = ""; $db_connection_type = "mysql"; $time_offset = 0; ?> Then - probably the most important file, containing all the data ; <?php require "config.php"; require "connect_db.php"; $start = "2009-05-01"; $end = "2009-05-02"; $sql = "SELECT DISTINCT room.RoomString "; $sql .= "FROM bookings INNER JOIN room ON bookings.RoomString = room.RoomString "; $sql .= "WHERE ((bookings.CheckOut > '" . $start . "' "; $sql .= "AND bookings.CheckOut <= '" . $end . "') "; $sql .= "OR (bookings.CheckIn < '" . $end . "' "; $sql .= "AND bookings.CheckIn >= '" . $start . "') "; $sql .= "OR (bookings.CheckIn <= '" . $start . "' "; $sql .= "AND bookings.CheckOut >= '" . $end . "'))"; $unavailable_objets = db_query($database_name, $sql); $unavailable_list = ""; while($unavailable_objets_ = fetch_array($unavailable_objets)) { $unavailable_list .= $unavailable_objets_["RoomString"] . ","; } if($unavailable_list != "") { $unavailable_list = substr($unavailable_list, 0, strlen($unavailable_list)-1); } //shorts last comma $sql = "SELECT DISTINCT * "; $sql .= "FROM room "; if($unavailable_list != "") { $sql .= "WHERE room.RoomString NOT IN ( " . $unavailable_list . " )"; } $sql .= ";"; $available_objects = db_query($database_name, $sql); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../styles.css" rel="stylesheet" type="text/css"> </head> <body> <div align="center"> <table width="900" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="900" height="187" valign="top"><div align="center"><span id="title_" style="font-size:24px"><?php echo $start; ?>-<?php echo $end; ?></span> <table width="299"> <tr class="page_nav_div"> <th width="168">Name</th> <th width="115">Available</th> </tr> <?php while($available_objets_ = fetch_array($available_objects)) { ?> <tr bgcolor="#F7F7F7"> <td nowrap><?php echo $available_objets_["Name"]; ?> <div align="left"></div></td> <td nowrap><?php echo $available_objets_["Desc"]; ?> <div align="left"></div> <div align="left"></div></td> </tr> <?php } ?> </table> </div></td> </tr> <tr> <td height="37"> </td> </tr> </table> </div> </body> </html> And here is the SQL CREATE TABLE IF NOT EXISTS `bookings` ( `bookID` int(10) NOT NULL auto_increment, `RoomString` text, `BookedBy` text, `CheckIn` date NOT NULL default '0000-00-00', `CheckOut` date NOT NULL default '0000-00-00', PRIMARY KEY (`bookID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; INSERT INTO `bookings` (`bookID`, `RoomString`, `BookedBy`, `CheckIn`, `CheckOut`) VALUES (1, 'RO001', 'PER1', '2009-05-01', '2009-05-05'), (2, 'RO001', 'PER2', '2009-05-10', '2009-05-15'), (3, 'RO003', 'PER3', '2009-05-01', '2009-05-02'); CREATE TABLE IF NOT EXISTS `room` ( `roomID` int(10) NOT NULL auto_increment, `RoomString` text, `Name` text, `Desc` text, PRIMARY KEY (`roomID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; INSERT INTO `room` (`roomID`, `RoomString`, `Name`, `Desc`) VALUES (1, 'RO001', 'Kamer1', 'Dit is kamer 1'), (2, 'RO002', 'Kamer2', 'Dit is kamer 2'), (3, 'RO003', 'Kamer3', 'Dit is kamer 3'); When configuring the database line when connecting to the database, to display errors, I get the following error : (Database connection to display errors) Error : There was an error executing query 'ySQL stated: Unknown column 'RO001' in 'where clause'. Please, if anyone could assist. Thank you ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
×
×
  • 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.